Skip to content
BENIBIX Learn

Exactly-Once Semantics

Data📥 Ingestion & StreamingDelivery Guarantees

Also known as Exactly Once, Exactly-Once Delivery, Exactly-Once Processing, EOS

Each message counts one time, even if it is sent twice.

Think of it like

It is like a teacher who ticks your name when you hand in work. Hand it in twice, and it still counts once.

Example

A bank adds up deposits from a stream. With exactly-once turned on, a retried deposit is never added to the total twice.

Why it matters

Money, stock counts and billing cannot be off by one. Exactly-once makes streaming safe for them.

Definition

Exactly-once semantics means each message changes the result one time only, even when sends are retried. The message may still travel twice, but the copy has no effect. Each message gets an ID. The result and the read position are saved together. Kafka offers it through safe producers and transactions. It is slower and harder to set up than the other two.
What happens to one message when a send fails, under each guarantee.

Common mistake

Thinking it covers the whole path. It stops at the edge, so a write to an outside system still needs its own check.

Key takeaways

  1. 1
    Counted once. The effect happens one time.
  2. 2
    IDs and transactions. Copies are spotted and dropped.
  3. 3
    Ends at the edge. Outside writes need their own care.

Compare