Skip to content

Checking your reading list…

Retry verification

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Master AMQP: Key Terms and Concepts Every Developer Should Know
Fundamentals 5 min read

Master AMQP: Key Terms and Concepts Every Developer Should Know

This guide defines and explains essential AMQP terminology—including virtual hosts, queues, exchanges, bindings, routing keys, producers, consumers, connections, and channels—to help developers grasp how message routing and queue management work in modern messaging systems.

This article defines and explains the core terminology used in AMQP message queues, helping readers understand concepts such as virtual hosts, queues, exchanges, bindings, routing keys, producers, consumers, connections, and channels.

Vhost

Virtual Host (Vhost) is similar to a namespace, providing logical isolation. Each user can create a limited number of Vhosts, and each Vhost can contain a limited number of Exchanges and Queues.

Queue

A queue stores messages; each message is placed into one or more queues.

Auto Delete

Indicates whether the queue is automatically deleted after the last consumer unsubscribes. Values:

"true": the queue is deleted automatically after the last consumer unsubscribes.

"false": the queue remains after the last consumer unsubscribes.

Arguments: parameters for a queue, used to set dead‑letter exchange, dead‑letter routing key, and message TTL.

deadLetterExchange

Specifies the exchange to which dead‑letter messages are sent.

"DeadLetterRoutingKey": the routing key for dead‑letter messages; the dead‑letter exchange routes messages to queues whose binding key matches this routing key.

"MessageTTL": message time‑to‑live in milliseconds; messages not consumed within this period become dead‑letter messages and are sent to the dead‑letter exchange.

Producer

A producer is the program that publishes messages to the broker.

Consumer

A consumer is the program that receives messages from the broker.

Connection

A TCP connection between a producer or consumer and the AMQP broker.

Channel

Within a single TCP connection, multiple channels can be created; each channel represents an independent session.

Exchange

Producers send messages to an exchange, which routes them to one or more queues (or discards them) based on binding rules.

Exchange types:

Fanout: broadcasts messages to all bound queues.

Direct: routes messages to queues whose binding key exactly matches the routing key.

Topic: similar to direct but supports pattern matching; uses * for a single word and # for zero or more words.

Example: a routing key use.stock will match bindings such as *.stock, use.stock, *.*, and #.use.stock.#.

Binding

A set of rules that tell an exchange which queue(s) should receive a message; it links an exchange to a queue using routing criteria.

Routing Key

When a producer sends a message to an exchange, it specifies a routing key that, together with the exchange type and binding key, determines the destination queue(s).

Typically, after configuring exchange type and binding key, the producer selects a routing key to control which queue receives the message.

About this article

For questions about attribution, corrections or content rights, please contactadmin@besthub.devand we will review it promptly.

Report an issue with this article
Backend DevelopmentMessage QueueAMQPQueueExchangeRouting Key

Reader feedback

Was this useful?

Useful0

Discussion 0

Questions, practical examples and thoughtful responses.

Open full discussion