Try
↑ ↓ move↵ openesc close

Curriculum · Module 03, Queues and Streams

Lesson 2 · 7 topics · 42 min · Intermediate · 0/7 done

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

  1. 1The ack point4 min
  2. 2Three orders, and what exactly-once means7 min
  3. 3Crash a consumer around the ack7 min
  4. 4Slow is not dead: duplicates without a crash6 min
  5. 5Retry limits and the dead-letter queue7 min
  6. 6Publishing without losing the event7 min
  7. 7Duplicates, timeouts and exactly once: three checks4 min

Practise this lesson

13 interview questions on delivery guarantees, with worked answers and sources.

Practise these

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms