Curriculum · Module 03, Queues and Streams
Delivery guarantees
Ack before the work and lose messages, ack after and repeat them. Why "exactly once" means an idempotent effect, not a perfect network.
What each topic covers
- A consumer can crash between doing the work and telling the broker. Whichever order you pick, one of the two outcomes is bad.
- Ack first, ack last, and ack last with an idempotency key. Why exactly once is built end to end from at-least-once delivery and idempotent effects.
- Crash consumers before and after the ack and count lost messages, repeated side effects and redeliveries in each mode.
- Crash rates drive both failures, a slow consumer causes repeats on its own, and an idempotency key works only if it commits with the effect.
- How many redeliveries a message gets, what a dead-letter queue catches, and how to redrive it safely once the cause is fixed.
- Writing to a database and a broker is two writes with no shared transaction. The outbox pattern turns it into one write and a relay.
- Three quick checks on a payment consumer, an ack timeout that is too short, and what exactly once really means, plus the sources.
Topics
Practise this lesson
13 interview questions on delivery guarantees, with worked answers and sources.
Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms