Monedula

Scenario 02.1.3 · Committing offsets

Kafka committed offsets: enable.auto.commit and restart

Consumer groups · Intermediate · about 3 min · Apache Kafka 4.3

The committed offset is the resume point. Auto-commit saves it periodically; manual commit lets the app choose when.

Run this scenario in the playground

Restarted · resumes at the committed offset. t+3.100s

c1 restarted and resumed at the committed offset 3 - it does NOT re-read O1-O3. Manual commit uses the same mechanism but the app picks exactly when to save, trading re-processing after a crash against losing un-committed work.

Open at this step: step 4, Restarted · resumes at the committed offset

What you start with

The committed offset is where a group resumes after a restart or rebalance, distinct from its live read position. This scenario shows enable.auto.commit periodically saving the position, then a crash-and-restart resuming from the committed offset instead of re-reading.

Step by step

  1. Consumer ready · auto-commit on t+0.000s Group g1 reads with enable.auto.commit=true. Watch the committed offset (the resume point), not just the live position. Open at this step: step 1, Consumer ready · auto-commit on
  2. Read and committed up to 3 t+1.600s The consumer read O1-O3 (position 3) and auto-commit saved that as the committed offset (3). The committed offset - not the position - is what survives a restart. Open at this step: step 2, Read and committed up to 3
  3. Consumer crashed t+2.400s c1 crashed and stopped polling. Its committed offset (3) is held by the group coordinator, independent of the live member. Open at this step: step 3, Consumer crashed
  4. Restarted · resumes at the committed offset t+3.100s c1 restarted and resumed at the committed offset 3 - it does NOT re-read O1-O3. Manual commit uses the same mechanism but the app picks exactly when to save, trading re-processing after a crash against losing un-committed work. Open at this step: step 4, Restarted · resumes at the committed offset

The takeaway

The committed offset is a durable bookmark, not the read position - commit timing is the lever between at-least-once and at-most-once, deciding how much is reprocessed or skipped after a failure.

Configs in this scenario

Embed this scenario

Paste this into a blog post, a course page or your team's docs. The scenario plays inside your page, and the link under it points readers to this walkthrough.

<iframe src="https://monedula.dev/kafka-simulator/embed/?scenario=02.1.3" title="Kafka Simulator: Committing offsets" width="100%" height="520" style="border:1px solid #d0d0d0;border-radius:8px" loading="lazy"></iframe>
<p><a href="https://monedula.dev/kafka-simulator/scenarios/committing-offsets/">Kafka committed offsets: enable.auto.commit and restart</a></p>

Further reading

Apache Kafka documentation

More in Consumer groups

All scenarios