Optional
argumentsOptional
x-Optional
x-Optional
concurrencyNon-zero positive integer. Maximum number of messages to process at once. Should be less than or equal to "qos.prefetchCount". Any prefetched, but unworked, messages will be requeued when the underlying channel is closed (unless noAck=true, when every received message will be processed).
Optional
consumerSpecifies the identifier for the consumer. The consumer tag is local to a channel, so two clients can use the same consumer tags. If this field is empty the server will generate a unique tag.
Optional
exchangeAny exchange-exchange bindings to be declared before the consumer and whenever the connection is reset. See Channel.exchangeBind
Optional
arguments?: Record<string, any>A set of arguments for the binding. The syntax and semantics of these arguments depends on the exchange class.
Specifies the name of the destination exchange to bind.
Optional
routingSpecifies the routing key for the binding. The routing key is used for routing messages depending on the exchange configuration. Not all exchanges use a routing key - refer to the specific exchange documentation.
Specifies the name of the source exchange to bind.
Optional
exchangesAny exchanges to be declared before the consumer and whenever the connection is reset. See Channel.exchangeDeclare
Optional
arguments?: { Optional
alternate-Optional
autoIf set, the exchange is deleted when all queues have finished using it.
Optional
durable?: booleanIf set when creating a new exchange, the exchange will be marked as durable. Durable exchanges remain active when a server restarts. Non-durable exchanges (transient exchanges) are purged if/when a server restarts.
Exchange names starting with "amq." are reserved for pre-declared and standardised exchanges. The exchange name consists of a non-empty sequence of these characters: letters, digits, hyphen, underscore, period, or colon.
Optional
internal?: booleanIf set, the exchange may not be used directly by publishers, but only when bound to other exchanges. Internal exchanges are used to construct wiring that is not visible to applications.
Optional
passive?: booleanIf set, the server will reply with Declare-Ok if the exchange already exists with the same name, and raise an error if not. The client can use this to check whether an exchange exists without modifying the server state. When set, all other method fields except name and no-wait are ignored. A declare with both passive and no-wait has no effect. Arguments are compared for semantic equivalence.
Optional
type?: stringdirect, topic, fanout, or headers: Each exchange belongs to one of a set of exchange types implemented by the server. The exchange types define the functionality of the exchange - i.e. how messages are routed through it.
Optional
exclusiveRequest exclusive consumer access, meaning only this consumer can access the queue.
Optional
lazyIf true, the consumer will not automatically start. You must call consumer.start() yourself.
Optional
noIf this field is set the server does not expect acknowledgements for messages. That is, when a message is delivered to the client the server assumes the delivery will succeed and immediately dequeues it. This functionality may increase performance but at the cost of reliability. Messages can get lost if a client dies before they are delivered to the application.
Optional
noIf the no-local field is set the server will not send messages to the connection that published them.
Optional
qosIf defined, basicQos() is invoked just before creating the consumer and whenever the connection is reset
Optional
global?: booleanRabbitMQ has reinterpreted this field. The original specification said: "By default the QoS settings apply to the current channel only. If this field is set, they are applied to the entire connection." Instead, RabbitMQ takes global=false to mean that the QoS settings should apply per-consumer (for new consumers on the channel; existing ones being unaffected) and global=true to mean that the QoS settings should apply per-channel.
Optional
prefetchSpecifies a prefetch window in terms of whole messages. This field may be used in combination with the prefetch-size field; a message will only be sent in advance if both prefetch windows (and those at the channel and connection level) allow it. The prefetch-count is ignored if the no-ack option is set.
Optional
prefetchThe client can request that messages be sent in advance so that when the client finishes processing a message, the following message is already held locally, rather than needing to be sent down the channel. Prefetching gives a performance improvement. This field specifies the prefetch window size in octets. The server will send a message in advance if it is equal to or smaller in size than the available prefetch size (and also falls into other prefetch limits). May be set to zero, meaning "no specific limit", although other prefetch limits may still apply. The prefetch-size is ignored if the no-ack option is set.
Optional
queueSpecifies the name of the queue to consume from. If blank then the last declared queue (on the channel) will be used.
Optional
queueAny queue-exchange bindings to be declared before the consumer and whenever the connection is reset. See Channel.queueBind
Optional
arguments?: Record<string, any>Name of the exchange to bind to.
Optional
queue?: stringSpecifies the name of the queue to bind. If blank, then the last declared queue on the channel will be used.
Optional
routingSpecifies the routing key for the binding. The routing key is used for routing messages depending on the exchange configuration. Not all exchanges use a routing key - refer to the specific exchange documentation. If the queue name is empty, the server uses the last queue declared on the channel. If the routing key is also empty, the server uses this queue name for the routing key as well. If the queue name is provided but the routing key is empty, the server does the binding with that empty routing key. The meaning of empty routing keys depends on the exchange implementation.
Optional
queueAdditional options when declaring the queue just before creating the consumer and whenever the connection is reset.
Optional
arguments?: { Optional
x-Optional
x-Optional
x-Queue Expiry https://www.rabbitmq.com/ttl.html#queue-ttl
Optional
x-Optional
x-Optional
x-Per-Queue Message TTL https://www.rabbitmq.com/ttl.html#per-queue-message-ttl
Optional
x-Optional
x-Optional
autoIf set, the queue is deleted when all consumers have finished using it. The last consumer can be cancelled either explicitly or because its channel is closed. If there was no consumer ever on the queue, it won't be deleted. Applications can explicitly delete auto-delete queues using the Delete method as normal.
Optional
durable?: booleanIf set when creating a new queue, the queue will be marked as durable. Durable queues remain active when a server restarts. Non-durable queues (transient queues) are purged if/when a server restarts. Note that durable queues do not necessarily hold persistent messages, although it does not make sense to send persistent messages to a transient queue.
Optional
exclusive?: booleanExclusive queues may only be accessed by the current connection, and are deleted when that connection closes. Passive declaration of an exclusive queue by other connections are not allowed.
Optional
passive?: booleanIf set, the server will reply with Declare-Ok if the queue already exists with the same name, and raise an error if not. The client can use this to check whether a queue exists without modifying the server state. When set, all other method fields except name and no-wait are ignored. A declare with both passive and no-wait has no effect.
Optional
queue?: stringThe queue name MAY be empty, in which case the server MUST create a new queue with a unique generated name and return this to the client in the Declare-Ok method. Queue names starting with "amq." are reserved for pre-declared and standardised queues. The queue name can be empty, or a sequence of these characters: letters, digits, hyphen, underscore, period, or colon.
Optional
requeueRequeue message when the handler throws an Error (as with Channel.basicNack)
https://www.rabbitmq.com/ha.html#cancellation