Skip to content
Kafka Is Fun

Lesson 3 of 5

Offset Management

1 min read

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

Consumer settingsproperties
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 group

Production tip

Check yourself

What is the difference between commitSync() and commitAsync()?

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