AMQP Message Flow Workbench

Trace one AMQP message from publisher to exchange, queue, consumer acknowledgment, requeue, dead letter, or mandatory return.

animation
amqp
protocols
messaging
reliability
Interactive AMQP message flow animation showing channel setup, basic.publish, exchange routing, queue storage, publisher confirms, manual and automatic acknowledgements, prefetch, consumer crash redelivery, requeue, dead lettering, and mandatory returns.
AMQP Flow Reliability Acknowledgements

AMQP Message Flow Workbench

Send one message through an AMQP broker and watch the separate reliability loops: publisher confirm protects the publisher-to-broker handoff, while consumer acknowledgements control what happens after delivery.

Phase Setup
Publisher result Waiting
Queue state Ready
Consumer result Not delivered
1

Publish to an exchange

The producer sends Basic.Publish to an exchange with a routing key. It never pushes directly into a consumer.

2

Route into a queue

The exchange checks bindings. If a route exists, the broker places a copy into the matched queue.

3

Confirm publisher safety

Publisher confirms tell the sender the broker accepted the message. They do not mean the consumer processed it.

4

Acknowledge delivery

Manual ACK removes the message. Reject, NACK, or a consumer crash can requeue or dead-letter it.

Manual ACK: processed successfully

The message is accepted by the broker, routed to a queue, delivered to a consumer, and removed only after the consumer ACKs it.

message: persistent consumer: manual ACK route: matched
1. SetupChannel and bindings exist.
2. PublishProducer sends Basic.Publish.
3. ExchangeBinding rules are checked.
4. QueueMatched queue stores a copy.
5. ConfirmPublisher gets broker feedback.
6. DeliverConsumer receives the message.
7. OutcomeACK, requeue, DLQ, or return.
1
Producer sends Basic.Publish enters the exchange through an open channel.
2
Exchange decides The binding matches, so the queue can receive one copy.
3
Queue holds The broker stores the message until delivery and acknowledgement.
4
Consumer responds Manual ACK removes the message only after processing.
5
Final state The message is either done, requeued, dead-lettered, or returned.
AMQP message flow animation A producer publishes an AMQP message to an exchange. The broker routes it to a queue, confirms to the publisher, delivers to a consumer, and handles ACK, requeue, dead letter, crash, or mandatory return outcomes. Setup: one channel, one exchange, one bound queue, one consumer. Use Step to separate publisher confirms from consumer acknowledgements. Producer publisher channel Exchange direct route Queue ready = 1 Consumer manual ack Done message removed DLX dead letter exchange DLQ inspect or retry Basic.Publish binding match Basic.Deliver Basic.Ack publisher confirm requeue reject requeue=false Basic.Return delivery_mode=2 durable queue
Normal delivery path Return or requeue path Failure or dead letter path

Current Decision

The channel and bindings are ready. Publish the message and follow which party confirms which part of the journey.

Ready1
Unacked0
DLQ0

Protocol Trace

1. Channel.Open and Queue.Bind complete.
2. Waiting for Basic.Publish.
AMQP Flow Quick Reference

Publisher Confirms

  • Confirm mode is a publisher-to-broker safety loop.
  • Basic.Ack means the broker accepted responsibility for the publish.
  • It does not prove that any consumer processed the message.

Consumer ACKs

  • Manual ACK keeps a delivered message unacked until the consumer responds.
  • ACK removes it; reject or NACK can requeue or dead-letter it.
  • A channel or connection close requeues unacked deliveries.

Durability

  • Use a durable queue and a persistent message for restart survival.
  • Publisher confirms let the sender know the broker accepted the durable handoff.
  • Transient messages prioritize speed over restart safety.

Prefetch

  • Prefetch limits concurrent unacknowledged deliveries.
  • prefetch=1 keeps one in-flight message per consumer.
  • Higher values improve throughput but increase retry burst size.

Dead Lettering

  • Reject or NACK with requeue=false can route to a DLX.
  • TTL expiry, queue length limits, and delivery limits can also dead-letter.
  • DLQs are for evidence, retry policy, and operator triage.

Common Confusion

  • Publisher confirm and consumer ACK are separate guarantees.
  • Auto ACK removes broker-side recovery after delivery.
  • Mandatory return handles no-route publishes, not consumer failures.