System Design
9. Message Queues and Event-Driven SystemsAnimated
Message Deduplication
Ignoring duplicate messages.
The idea
Messages may be delivered more than once. A unique id lets consumers skip repeats.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
The client attaches a unique key to a risky request.
- step:
- 1/6
- from:
- Client
- to:
- API
1/6
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1Attach a unique id
- 2Consumer checks if seen
- 3If seen, skip
- 4Otherwise process and record
Where it is used
At-least-once delivery.
Watch out for
The seen-id store must be fast and durable.