Route work to queues, then transfer responsibility explicitly#
RabbitMQ fits background work and message routing where producers publish through a broker topology, queues hold pending deliveries, and consumers acknowledge ownership after processing. It is not primarily a retained history that every future consumer replays.
Exchange bindings route messages to queues#
| Routing tendency | Use |
|---|---|
| Direct | Exact routing-key matches. |
| Fan-out | Copy a publication to every bound queue. |
| Topic-style | Pattern-based routing across hierarchical keys. |
The important design is which queue owns backlog and failure behavior, not memorizing every exchange option.
Consumer acknowledgements and publisher confirms cover different transfers#
A consumer acknowledgement tells the broker that processing responsibility has transferred and the delivery can be removed. A publisher confirm tells the producer the broker has accepted responsibility according to configuration. Connection success alone does not prove either application-level handoff.
When to choose it - and when not to#
| Good fit | Look elsewhere when |
|---|---|
| Work queues and flexible broker routing are central. | Long retained history and replay by many groups are central. |
| Acknowledgements and queue-level ownership match the workflow. | A managed queue removes operations you do not need to control. |
| Multiple routing patterns justify exchange topology. | One simple worker queue does not justify broker operations. |
- Equating broker receipt with completed business processing.
- Acknowledging before the durable side effect.
- Assuming redelivery cannot happen.
- Using RabbitMQ as retained analytics history by default.
- Building complicated exchange topology without a routing requirement.
Use these prompts to extend the design. The useful answer is a reasoned change, not a memorized sentence.
- Who owns a message after each handoff?
- What triggers acknowledgement?
- How are poison jobs and retries isolated?
- What happens when a node or connection fails?
- Why not SQS or Kafka?
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- RabbitMQ exchanges and routingRabbitMQ Documentation
- RabbitMQ reliability guideRabbitMQ Documentation