Offsets make progress explicit#
Partition 0
offset 40 → A
offset 41 → B
offset 42 → CA group tracks processed or committed positions per partition. Restart can resume, deliberate rewind can replay, and lag measures distance from the latest available offset.
Measure consumer lag
latest offset = 1,000,000
group position = 980,000
lag ≈ 20,000 recordsLag is workload, not time by itself. Combine it with record rate and oldest-event age.
When a consumer joins, leaves, or crashes, partitions are reassigned. Rebalancing can pause work and repeat processing near an offset-commit boundary.
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- Apache Kafka introductionApache Kafka Documentation