Try
↑ ↓ move↵ openesc close
In this lesson · topic 7 of 7
  1. 1. The ack point
  2. 2. Three orders, and what exactly-once means
  3. 3. Crash a consumer around the ack
  4. 4. Slow is not dead: duplicates without a crash
  5. 5. Retry limits and the dead-letter queue
  6. 6. Publishing without losing the event
  7. 7. Duplicates, timeouts and exactly once: three checks

Topic 7

Duplicates, timeouts and exactly once: three checks

4 min read

Predict first

A payment consumer works first and acks after. It crashes after charging a card and before the ack. What does the broker do, and what must the consumer have made sure of?

Predict first

Nothing crashes, but the ack timeout is shorter than the slowest consumers' work. What do you see under at-least-once delivery?

Predict first

Which statement about exactly once is the most accurate?

Take away

  • Ack first loses messages on a crash. Ack last repeats them. The broker cannot tell which crash happened.
  • A slow consumer causes repeats as surely as a dead one. Treat redelivery as routine.
  • Exactly once is end to end: at-least-once delivery, plus an effect that is safe to repeat.
  • An idempotency key works only when it commits in the same transaction as the effect, and when it outlives any possible redelivery.

Sources

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