System Design
9. Message Queues and Event-Driven SystemsAnimated
Message Acknowledgements
Consumers confirm processing.
The idea
A message is removed only after the consumer acknowledges it, otherwise it is redelivered.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
A producer sends a message.
- step:
- 1/6
- from:
- Producer
- to:
- Broker
1/6
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1Consumer receives
- 2Processes
- 3Sends an ack
- 4Broker deletes the message
Where it is used
Reliable delivery.
Watch out for
Ack before work finishes risks loss; after risks duplicates.