Using go-lang 1.18
with confluent-kafka-go v1.8.2
used enable.auto.commit = false
config. we are manually committing the offset once the successful processing of the message.
However, even after setting this config once we got an error while processing, we are not seeing the message with the same key. (that means somehow offset is getting committed even in error scenarios ).
Note: for the error scenario, it took 8-9 sec to process and completely call it an error.
Also got this from link It is recommended to set `enable.auto.offset.store=false` for long-time processing applications and then explicitly store offsets (using offsets_store()) after message processing, to make sure offsets are not auto-committed prior to processing has finished.
Que:
- By default how much time does kafka wait till it auto-commits the offset.
- Do we have a mechanism to stop this auto-commit at all.
Offsets are committed at the intervals configured in
auto.commit.interval.ms
, which by default is 5 seconds.Setting
enable.auto.commit
to false should be enough to disable auto-committing completely.