...

/

Delivery Guarantees: Effectively-Once

Delivery Guarantees: Effectively-Once

Learn the concept of effectively-once delivery in event brokers and explore its benefits, trade-offs, and code examples in a Kafka-based system.

Effectively-once delivery means that the broker will ensure that a produced event is delivered effectively once (too obvious, right?). What this means is only one Consumers can read the event, and the broker expects acknowledgment it has processed the event.

This delivery guarantee is also known as exactly once. There are many reasons why the use of the term exactly is hotly debated. For the purposes of this course, we will continue calling it effectively once and avoid those arguments.

One approach to achieving effectively-once delivery requires transactional scopes on both the producer and the broker. Because these are separate processes, there’s always a risk that one scope will successfully commit and the other will fail before completing its commit. We can keep this risk extremely low by keeping the scope committals side by side in code without any other complexities between, but this dual transaction scope synchronization simply can not ...