HareMq.Queue (hare_mq v0.1.0)

Module providing functions for managing RabbitMQ queues.

This module includes functions for declaring queues and binding them to exchanges.

Summary

Functions

Bind a queue to an exchange with the specified routing key.

Declare a durable RabbitMQ dead letter queue with specified options.

Declare a durable RabbitMQ delay queue with specified options.

Declare a durable RabbitMQ queue.

Functions

Bind a queue to an exchange with the specified routing key.

Parameters

  • config: A %Configuration{} struct containing queue configuration.

Examples

HareMq.Queue.bind(%Configuration{channel: channel, queue_name: "my_queue", exchange: "my_exchange", routing_key: "my_routing_key"})
Link to this function

declare_dead_queue(config)

Declare a durable RabbitMQ dead letter queue with specified options.

Parameters

  • config: A %Configuration{} struct containing queue configuration.

Examples

HareMq.Queue.declare_dead_queue(%Configuration{channel: channel, dead_queue_name: "my_queue.dead", message_ttl: 3600000})
Link to this function

declare_delay_queue(config)

Declare a durable RabbitMQ delay queue with specified options.

Parameters

  • config: A %Configuration{} struct containing queue configuration.

Examples

HareMq.Queue.declare_delay_queue(%Configuration{channel: channel, delay_queue_name: "my_queue.delay", exchange: "my_exchange", routing_key: "my_routing_key", delay_in_ms: 5000})
Link to this function

declare_queue(config)

Declare a durable RabbitMQ queue.

Parameters

  • config: A %Configuration{} struct containing queue configuration.

Examples

HareMq.Queue.declare_queue(%Configuration{channel: channel, queue_name: "my_queue", durable: true})