Try
↑ ↓ move↵ openesc close
In this lesson · topic 7 of 7
  1. 1. The retry that charges twice
  2. 2. Keys and the dedup table
  3. 3. Retry, crash and publish
  4. 4. Keys that expire
  5. 5. Two writes and a crash between them
  6. 6. Publishing twice on purpose
  7. 7. Keys, the outbox and repeats

Topic 7

Keys, the outbox and repeats

3 min read

Predict first

What must be true of an idempotency key across retries?

Predict first

What does the transactional outbox guarantee?

Predict first

Why is a very short key lifetime risky?

Take away

  • A client that gets no reply must retry, so a service must tolerate repeats.
  • An idempotency key names one operation. The service stores it with the result, in the same transaction as the effect.
  • Keys must live longer than the longest retry, and the table must still be pruned.
  • A dual write to a database and a broker can lose the event, and no retry can fix it.
  • The outbox writes the event with the data. A relay publishes it at least once.
  • Consumers drop repeats by event id. The effect is once, though no hop is.

Sources

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