manual offset commit
Committing a consumer's offsets by calling commit in your own code instead of relying on the automatic timer.
In more detail
Manual commits let you decide exactly when progress is saved, for example only after a record has been fully processed. Where you place the commit decides whether a crash causes duplicates or lost records.
Example
consumer.commit()Related terms
- enable.auto.commit — The consumer setting that, when true, commits offsets automatically on a background timer.
- committed offset — The offset a consumer group has saved on the broker for a partition, marking the next record it should read after a restart.
- at-least-once delivery — A delivery guarantee under which every message arrives, but some may arrive more than once.
- at-most-once delivery — A delivery guarantee in which each message is processed once or not at all, never twice.
Taught in
- Committing Offsets: Auto, Manual And Lag — Apache Kafka & Event Streaming
- At Most Once, At Least Once — Apache Kafka & Event Streaming
- Watching Lag And Sizing Partitions — Apache Kafka & Event Streaming