Protocols
Saved & recent

Delivery semantics

Also called: delivery guarantees, at most once, at least once, exactly once

Delivery semantics describe the outcomes a messaging system promises under stated failures and assumptions. At-most-once delivery may lose work but avoids redelivery. At-least-once delivery retries uncertain work and can produce duplicates. Exactly-once processing requires a defined boundary within which repeated attempts produce one committed result.

For example, a consumer can update a database and crash before acknowledging its message. Redelivery may repeat the database change unless the application deduplicates or coordinates the two steps. Kafka transactions can coordinate supported Kafka records and offsets; effects in another system require cooperation from that system.

Related
Consumer acknowledgment, Idempotency, Retry backoff and jitter, Transactional outbox
Further reading
Apache Kafka — Design: Message Delivery Semantics
at most once message missing completion at least once message same message processed processed again transactional case same message one committed result explicit transaction boundary external effects outside this boundary
Schematic outcomes for one intended message: at-most-once can miss completion; at-least-once can repeat processing; coordinated repeated attempts can produce one committed result within an explicit boundary. External effects lie outside that boundary unless coordinated too.

View in the full Protocols collection