at-least-once delivery
A delivery guarantee under which every message arrives, but some may arrive more than once.
In more detail
It favours never losing a message over uniqueness. Consumers must make their effects idempotent, for example by recording processed event identifiers.
Example
Kafka's default; the transactional outbox also delivers at least once.Related terms
- idempotent consumer — A message or webhook handler that produces the same result whether it sees a message once or several times.
- deduplication — Detecting and discarding repeated copies of the same message or request, usually by remembering identifiers already processed.
- message queue — A store that holds messages from producers until consumers are ready to process them, decoupling the rate of arrival from the rate of work.
- delivery semantics — The promise a messaging system makes about how many times each message is delivered: at most once, at least once or exactly once.
- duplicate record — A second copy of a record that was meant to be written or processed only once.
- idempotency — The property of an operation that gives the same result whether you run it once or many times, because a repeat run finds nothing left to do.
- at-most-once delivery — A delivery guarantee in which each message is processed once or not at all, never twice.
- transactional outbox — Saving an event into an outbox table in the same database transaction as the business change, then having a separate worker publish it.
- exactly-once semantics — A guarantee that each message's effects happen exactly once, even when senders retry or consumers crash.
Taught in
- Event-Driven Architecture And Queues — Modern API Architecture: REST, GraphQL & gRPC
- The Payment That Was Charged Twice — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Retry That Overtook — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Too Slow Between Two Polls — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Asynchronous Event Processing: Outbox Pattern & Queues — Production Full-Stack Engineering
- Full-Stack System Verification: Capstone Integration — Production Full-Stack Engineering
- At Most Once, At Least Once — Apache Kafka & Event Streaming
- Duplicates Are The Default — Apache Kafka & Event Streaming
- The Transactional Outbox — Apache Kafka & Event Streaming
- Idempotency, And Exactly Once As A Fiction — Scalable System Design & Distributed Architecture
- Worked Design Two: A Global Chat System — Scalable System Design & Distributed Architecture
- Worked Design Three: A Metrics Ingestion Pipeline — Scalable System Design & Distributed Architecture
References
- Apache Kafka documentation: Message delivery semantics
- Amazon SQS: Standard queues (at-least-once delivery)
- Apache Kafka design: message delivery semantics
- RabbitMQ: Reliability guide
- Amazon SQS Developer Guide
- Apache Kafka documentation: Design