Search⌘ K
AI Features

Delivery Guarantees: At-Least-Once

Explore the at-least-once delivery guarantee in event-driven microservices, understanding how it ensures events are processed at least once while handling duplicates. Learn practical approaches for producer retries and consumer idempotency that help minimize data loss and maintain system reliability.

At-least-once delivery means that the broker will ensure that a produced event is delivered at least once (still obvious, right?). What this means is that all consumers can read the event, and the broker will continue to deliver it to any other consumer until such a time as a consumer acknowledges it has processed the event. It’s at-least-once delivery, so there’s a possibility that an event might be delivered more than once.

The Producer must wait for acknowledgment from the broker that an event is received. If the broker doesn’t acknowledge successful receipt, then the Producer will repeatedly try until it does. This adds a throughput overhead, which will impact performance and scalability. However, this also ensures an event is received by the broker as is required for the at-least-once delivery.

Any Consumer that reads the event that crashes or fails before it completes its work will not be able to acknowledge successful delivery. Therefore, the broker will continue allowing Consumers to read the event until it is acknowledged. Because of this, it’s entirely ...