Skip to content
Kafka Is Fun

Lesson 5 of 5

Delivery Semantics

1 min read

Overview

Kafka lets you choose. At-most-once: disable producer retries and commit consumer offsets before processing a batch, so messages may be lost but are never redelivered. At-least-once: a committed message is not lost as long as one broker that replicates its partition stays alive, so acks=all with an adequate min.insync.replicas is what makes the producer wait for that, but messages can be delivered more than once, for example when the producer retries without idempotence or a consumer processes a record before saving its position and then crashes. The design page says Kafka guarantees at-least-once delivery by default. The idempotent producer prevents duplicate log entries from producer retries within a session. Exactly-once for read-process-write on Kafka topics uses a transactional producer, with the consumer offsets written in the same transaction, plus a read_committed consumer, or Kafka Streams with processing.guarantee=exactly_once_v2.

Production tip

Check yourself

Which producer setup gives at-least-once delivery?

Sources

Checked against Kafka 4.2 documentation on Oct 2026. Draft: not yet reviewed by a Kafka specialist. Releases move on, so confirm against the current documentation before you act on a number.

Try it in the simulator

Guided scenarios for this module — the simulator opens with the exercise already running.

Prefer a picture? Open the live cluster in 3D and watch records move between producer, brokers and consumers.

Browse all troubleshooting entries