Overview
Consumers record their progress as committed offsets, which the group coordinator stores in an internal Kafka topic, __consumer_offsets. enable.auto.commit=true (the default) commits periodically, every auto.commit.interval.ms (5000 by default). The KafkaConsumer Javadoc says automatic commits can give at-least-once delivery, provided you consume all data returned from each poll before the next poll or close; otherwise the committed offset can run ahead of processing and records can be missed. Manual commit controls when a record counts as consumed: commitSync() blocks until the commit succeeds or fails, and commitAsync() does not block. After a restart the consumer resumes from its committed offset. auto.offset.reset applies only when there is no committed offset, or it no longer exists on the server: latest (the default), earliest (the earliest offset still available) or none (throw an exception).
Key configuration
enable.auto.commit=true — default; set false to commit manually
auto.commit.interval.ms=5000 — default
auto.offset.reset=latest — default; also earliest, none, by_duration:<duration>
max.poll.interval.ms=300000 — default: the maximum delay between poll() calls before the consumer is considered failed and leaves the groupProduction tip
Check yourself
What is the difference between commitSync() and commitAsync()?
Sources
- KafkaConsumer Javadoc (4.2) (opens in a new tab)
- Consumer configs (4.2 documentation) (opens in a new tab)
- Design (4.2 documentation) (opens in a new tab)
- Monitoring (4.2 documentation) (opens in a new tab)
- Topic.java (4.2 source) (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.