liveBook · Manning

At-least-once delivery

As explained in Grokking Software Architecture

A messaging guarantee under which a message is delivered one or more times, allowing duplicates.

At-least-once delivery means a broker retries messages until they are acknowledged, so a message is delivered one or more times. This helps prevent lost work, but a crash after processing and before acknowledgment can cause the same message to be processed again. Consumers should make repeated processing harmless with idempotency. section 7.4.2 section 7.4.3

The duplicate shipping label

A Shipping Service prints a label, then crashes before sending its acknowledgment. The broker assumes processing failed and resends the message; without idempotency, the service may print a second label. section 7.4.3

How Grokking Software Architecture covers it

How deep it goes
Explains redelivery through acknowledgments and crashes, then points to consumer idempotency without detailing its implementation.
Examples
Uses a Shipping Service that may print a duplicate label after crashing before acknowledgment.
What you can do after
Apply it by acknowledging successful work and making consumers idempotent so retries do not repeat costly effects.
How it connects
Connects message brokers and acknowledgments with idempotency, at-most-once delivery, and exactly-once delivery.

Also explained in

Compare how 6 books explain at-least-once delivery →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.