This topic introduces terms related to Message Queue for RabbitMQ to help you better understand and use Message Queue for RabbitMQ.


alternate exchange
An alternate exchange (AE) is configured for an existing exchange. It is used to receive messages that fail to be routed from the existing exchange to a queue.
Parameters for a queue, such as the message time-to-live (TTL), dead-letter exchange, and dead-letter routing key.
auto delete
An attribute of an exchange or a queue. If you set this attribute for an exchange to true, the exchange is automatically deleted after the last bound queue is unbound from the exchange. If you set this attribute for a queue to true, the queue is automatically deleted after the last subscription from consumers to this queue is canceled.


A set of binding rules. An exchange determines the queues to which it routes messages based on bindings. An exchange is bound to a queue based on routing rules.
binding key
Binding keys are used for an exchange to determine the queues to which it routes messages.


Multiple channels can be created on each physical Transmission Control Protocol (TCP) connection on the client. Each channel represents a session task. For more information, see Connection and channel.
The physical TCP connection between a producer or consumer and Message Queue for RabbitMQ. For more information, see Connection and channel.


A message routing agent. A producer sends a message to an exchange, and the exchange routes the message to one or more queues based on the attributes and content of the message. For more information, see Exchanges.


An attribute of an exchange. An internal exchange is bound to another exchange, instead of a queue.


Message ID
A message ID is an optional message property of the short string type. In most business scenarios, a message ID is a unique identifier. For example, you must define a unique identifier for each message so that you can track and identify the messages in sales orders and tickets. Message Queue for RabbitMQ servers do not ensure the idempotence of messages. Idempotence ensures that a consumer does not change the result beyond its first iteration when it receives a message multiple times. This way, repeated consumptions do not pose additional negative effects on business systems. To achieve this, you must specify a unique identifier for each message and then implement message idempotence on Message Queue for RabbitMQ consumers. For more information, see Message idempotence.


Each message is routed to one or more queues.


routing key
When a producer sends a message to an exchange, the producer specifies a routing key, which indicates the routing rules of the message. The routing key takes effect based on the type of the exchange and the binding keys of the queues bound to the exchange. In most cases, the routing key of a message can determine the queues to which the message is routed.


An independent Message Queue for RabbitMQ resource entity. An instance contains a number of basic resource elements, such as vhosts, exchanges, and queues.
A producer is a program that sends messages.
dead-letter exchange
An exchange that routes dead-letter messages to dead-letter queues based on binding keys, dead-letter routing keys, and headers attributes. All common types of exchanges, such as direct exchanges, can be used as dead-letter exchanges. For more information, see Dead-letter exchange.
dead-letter routing key
A set of routing rules for a dead-letter message. If you do not specify a dead-letter routing key for a dead-letter message, the existing routing key of the message is used as the dead-letter routing key.
dead-letter message
A message that is sent to a dead-letter exchange. A message is sent to a dead-letter exchange if one of the following situations occurs:
  • The requeue parameter is set to false, and the consumer uses basic.reject or basic.nack to negatively acknowledge the message.
  • The message is redelivered 16 times, but it still fails to be consumed. For more information, see Message retry.
Notice Expired messages or messages that are discarded due to limits on queue lengths do not become dead-letter messages.
dead-letter queue
A queue that is bound to a dead-letter exchange. A dead-letter queue is used to store dead-letter messages.


A virtual host that is used to logically isolate resources. A vhost manages its own exchanges, queues, and bindings. Applications securely run on independent vhost instances so that the business of an application is not affected by other applications. One instance can have multiple vhosts, and one vhost can have multiple exchanges and queues. To connect a producer or consumer to Message Queue for RabbitMQ, you must specify a vhost for the producer or consumer.


A program that receives and consumes messages.
message TTL
The validity period of messages in a queue. If the retention period of a message in a queue exceeds the message TTL of the queue, the message expires. The message TTL of a queue must be set to a non-negative integer, in milliseconds. For example, if the message TTL of a queue is set to 1000, messages survive for at most 1 second in the queue. For more information, see Message TTL.


delayed message
A message that is not immediately delivered to consumers after the Message Queue for RabbitMQ broker receives the message. The producer of the message wants the message to be delivered after a specific period of time. For more information, see Delayed messages.
The capability that a queue, exchange, or binding still exists after the broker restarts.