A Kafka Consumer by default periodically commits the current offsets unless it is turned off by disabling enable.auto.commit
. According to the documentation you're then responsible for committing the offsets yourself. So when I want manual control, that seems to be the way to go, however the documentation also mentions the stored offsets and that if you want manual control you should disable enable.auto.offset.store
and use rd_kafka_offsets_store()
and leave the auto-commit untouched.
Can somebody explain why the latter approach is to be preferred? Disabling auto-commits should have the exact same effect?