100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Big Data & Distributed Computing
25 minintermediate

Exactly-Once Delivery in Streaming Pipelines

Exactly-once delivery is the strongest correctness guarantee a streaming pipeline can provide: each event produces its effect on the downstream system exactly once, regardless of failures, retries, or reprocessing. It is also the hardest to achieve, requiring coordination between the event source, the processing engine, and the output sink — any of which may fail and require retry. Understanding the three delivery semantics — at-most-once, at-least-once, and exactly-once — and knowing when each is achievable is essential for designing streaming pipelines that meet correctness requirements without unnecessary operational complexity.

True exactly-once requires that the commit of processed offsets and the write of results to the destination happen atomically — both succeed or both fail, with no state where the results are written but the offsets are not committed (causing re-delivery) or the offsets are committed but the results are not written (causing lost events). In practice, exactly-once is achieved in most Kafka-to-sink pipelines through a combination of at-least-once delivery and idempotent sink writes — effectively-exactly-once semantics that are indistinguishable from true exactly-once in their final observable effect.

Analogy🏏Cricket
🏏 Think of it like cricket: Imagine the DRS review system deployed across three independent video-review centres in Mumbai, Chennai, and London, each holding a copy of the ball-tracking data. A CAP partition is a network outage that cuts communication between them. A CP system says: if the centres cannot synchronise, no review decision is issued — no player walks until the system is restored. Consistency is guaranteed; availability is sacrificed. An AP system says: each centre issues its own decision based on its local data, even if that means Mumbai says out and London says not out — reviews continue but different centres may give different verdicts. Partition tolerance is non-negotiable because the network always has the possibility of failing; the choice is whether umpires wait for consensus or proceed with local data.
Lesson 29 of 35
0% complete