awesome-everything RU
↑ Back to the climb

Queues, Streams, Eventing

Delivery guarantees: multiple-choice review

Crux Multiple-choice synthesis across the delivery-guarantees unit — the impossibility proof, the three failure legs, idempotent consumers, Kafka EOS, SQS timeouts, and the outbox.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 13 min

Six questions that cut across the whole unit. Each mirrors a decision you make in a real incident — not a definition to recite, but a tradeoff to weigh while customers are being double-charged.

Goal

Confirm you can connect the impossibility proof, the failure legs, consumer idempotency, Kafka transactions, SQS mechanics, and the outbox into one coherent end-to-end correctness story.

Quiz

A vendor's queue advertises 'exactly-once delivery'. A senior reviewer pushes back. What is the precise, correct objection?

Quiz

Across the three failure legs, which one produces the duplicates you actually fight in production, and why does fixing it land on the consumer?

Quiz

A team implements consumer dedup as: SELECT the msg_id; if absent, call Stripe and INSERT it. Under a consumer-group rebalance they still see double charges. What is the structural defect?

Quiz

A Kafka Streams job has enable.idempotence=true and transactional.id set, writing to an output topic AND a Postgres table. Ops still see duplicate Postgres rows after a broker restart. Why?

Quiz

An SQS consumer's average processing is 30s; the queue default visibility timeout is 30s. Engineers report sporadic concurrent double-processing. First fix, and what does it buy?

Quiz

A service updates Postgres and publishes a Kafka event as two separate steps. Under load, downstream consumers occasionally never see an event whose DB row clearly committed. Which pattern fixes the root cause?

Recap

The through-line of the unit is one chain: exactly-once delivery is impossible (Two Generals), so you run at-least-once and move correctness to the consumer. Duplicates concentrate at Leg 3; the cheapest defence is an INSERT-first transactional dedup, extended by a Stripe-style Idempotency-Key for external calls. Kafka’s idempotent producer (~3%) and transactions (~20–30%) only harden the within-Kafka path — cross-system writes still need consumer dedup. SQS visibility timeout must be ~6x processing (or heartbeated), and the outbox pattern closes the producer-side dual-write gap. Broker guarantees are necessary but never sufficient.

Continue the climb ↑Delivery guarantees: free-recall review
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.