A Queue declaration (kombu.entity.Queue).
Summary
Functions
Converts the queue into a dictionary representation (as_dict).
Raises Kombu.NotBoundError if neither queue.channel nor channel is bound.
Binds the queue (and its exchange if present) to channel.
Binds the queue to exchange with routing_key (Queue.bind_to).
Returns true if the queue is bound to a channel.
Returns true if declaration of this queue can be cached (not auto_delete and not expiring).
Returns true if the queue should be declared on the broker.
Cancels a consumer by tag (Queue.cancel).
Starts a queue consumer (Queue.consume).
Declares the exchange (if any), declares the queue, and binds the queue.
Returns {:ok, queue_name} or queue_name matching kombu.entity.Queue.declare.
Deletes the queue (Queue.delete).
Compares two %Kombu.Queue{} structs for value equality (ignoring channel binding).
Constructs a %Kombu.Queue{} from a dictionary (Queue.from_dict).
Polls the server for a single message in the queue (Queue.get).
Binds the queue (and its exchange) to channel if not already bound.
Creates a new %Kombu.Queue{}.
Supports
Purges all ready messages from the queue (Queue.purge).
Creates the queue binding(s) on the broker (Queue.queue_bind).
Declares the queue on the broker (Queue.queue_declare).
Returns the queue name.
Revives the queue with a new channel (Queue.revive).
Builds RabbitMQ-compatible queue arguments (x-expires, x-message-ttl,
x-max-length, x-max-length-bytes, x-max-priority) merged with arguments.
Unbinds the queue from its configured exchange (Queue.unbind).
Unbinds the queue from exchange (Queue.unbind_from).
Types
@type t() :: %Kombu.Queue{ alias: String.t() | nil, auto_delete: boolean(), binding_arguments: map() | nil, bindings: [Kombu.Binding.t()], channel: Kombu.Channel.t() | nil, consumer_arguments: map() | nil, durable: boolean(), exchange: Kombu.Exchange.t() | nil, exclusive: boolean(), expires: number() | nil, max_length: integer() | nil, max_length_bytes: integer() | nil, max_priority: integer() | nil, message_ttl: number() | nil, name: String.t(), no_ack: boolean(), no_declare: boolean(), on_declared: (String.t(), non_neg_integer(), non_neg_integer() -> any()) | nil, queue_arguments: map() | nil, routing_key: String.t() }
Functions
Converts the queue into a dictionary representation (as_dict).
@spec assert_bound!(t(), Kombu.Channel.t() | nil) :: Kombu.Channel.t()
Raises Kombu.NotBoundError if neither queue.channel nor channel is bound.
@spec bind(t(), Kombu.Channel.t() | nil) :: t()
Binds the queue (and its exchange if present) to channel.
@spec bind_to(t(), Kombu.Exchange.t() | String.t() | nil, keyword()) :: term()
Binds the queue to exchange with routing_key (Queue.bind_to).
Returns true if the queue is bound to a channel.
Returns true if declaration of this queue can be cached (not auto_delete and not expiring).
Returns true if the queue should be declared on the broker.
Cancels a consumer by tag (Queue.cancel).
Starts a queue consumer (Queue.consume).
Declares the exchange (if any), declares the queue, and binds the queue.
Returns {:ok, queue_name} or queue_name matching kombu.entity.Queue.declare.
Deletes the queue (Queue.delete).
Compares two %Kombu.Queue{} structs for value equality (ignoring channel binding).
Constructs a %Kombu.Queue{} from a dictionary (Queue.from_dict).
@spec get(t(), keyword()) :: Kombu.Message.t() | nil
Polls the server for a single message in the queue (Queue.get).
@spec maybe_bind(t(), Kombu.Channel.t() | nil) :: t()
Binds the queue (and its exchange) to channel if not already bound.
Creates a new %Kombu.Queue{}.
Supports:
Queue.new(name, opts)Queue.new(name, exchange, opts)Queue.new(name, exchange, routing_key, opts)
@spec purge(t(), keyword()) :: non_neg_integer()
Purges all ready messages from the queue (Queue.purge).
Creates the queue binding(s) on the broker (Queue.queue_bind).
Declares the queue on the broker (Queue.queue_declare).
Returns the queue name.
Revives the queue with a new channel (Queue.revive).
Builds RabbitMQ-compatible queue arguments (x-expires, x-message-ttl,
x-max-length, x-max-length-bytes, x-max-priority) merged with arguments.
Unbinds the queue from its configured exchange (Queue.unbind).
@spec unbind_from(t(), Kombu.Exchange.t() | String.t() | nil, keyword()) :: term()
Unbinds the queue from exchange (Queue.unbind_from).