Skip to content
Kafka Is Fun

BeginnerCore Concepts

What is the difference between at-most-once, at-least-once, and exactly-once delivery?

Reference answer

At-most-once: messages may be lost but are never redelivered (for example a producer using acks=0, where delivery is not guaranteed and retries have no effect, or a consumer that commits its offset before processing). At-least-once: messages are never lost but may be redelivered or duplicated (for example a producer that retries after a network error cannot be sure the first attempt failed, or a consumer that commits after processing). Exactly-once: each message is processed once and only once. Since 0.11 the producer supports an idempotent option (enable.idempotence, which defaults to true and requires acks=all) so that retries do not create duplicates, and transactions let it write atomically to multiple topic partitions; consumers use isolation.level=read_committed to see only committed transactional messages. Kafka documents exactly-once support in Kafka Streams through these mechanisms.

Expected key concepts: at-most-once, at-least-once, exactly-once, acks, retries, idempotence, duplicates, transactions, read_committed, commit

How did that feel?

Your own verdict, not the score. It shows up next to this question in the list, so you can come back to the shaky ones.