Overview
Messages may be lost but are never redelivered. The design documentation describes implementing it by disabling retries on the producer and committing offsets in the consumer before processing a batch. On the producer side, acks=0 means the producer does not wait for any acknowledgement (so retries have no effect), and acks=1 without retries can lose records: if the leader fails right after acknowledging a record but before the followers have replicated it, the record is lost.
Key configuration
acks=0
retries=0
# Consumer: commit the offset before processing the batch,
# for example enable.auto.commit=false and commitSync() firstProduction tip
Check yourself
How does the design documentation describe implementing at-most-once delivery?
Sources
- Design (4.2 documentation) (opens in a new tab)
- Producer configs (4.2 documentation) (opens in a new tab)
- KafkaConsumer Javadoc (4.2) (opens in a new tab)
- Consumer configs (4.2 documentation) (opens in a new tab)
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.