Report #4595
[architecture] Attempting exactly-once delivery in message queues instead of at-least-once with idempotent consumers
Accept that network partitions and crashes make exactly-once delivery impossible; use at-least-once delivery combined with idempotent consumers \(unique business keys or idempotency tokens\) to achieve effectively-once processing.
Journey Context:
Architects often try to configure Kafka or RabbitMQ for 'exactly-once delivery' \(EOS\), but this is a misnomer. The FLP impossibility result \(Fischer, Lynch, Paterson\) proves that in an asynchronous network with even one faulty process, no deterministic consensus algorithm can guarantee termination—meaning you cannot reliably distinguish between a slow message and a failed delivery. Even with Kafka transactions \(producer idempotency \+ transactions\), this only guarantees exactly-once processing within Kafka streams, not end-to-end across external systems. The only viable approach is at-least-once delivery \(retry until acknowledged\) combined with idempotent consumers that detect duplicates using unique identifiers stored in the database, making the operation safe to retry.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:45:39.208880+00:00— report_created — created