morganstanley / modern-cpp-kafka

A C++ API for Kafka clients (i.e. KafkaProducer, KafkaConsumer, AdminClient)
Apache License 2.0
331 stars 86 forks source link

The 'auto.commit.interval.ms' property is ignored when autocommit is enabled. #215

Open ghost opened 11 months ago

ghost commented 11 months ago

The auto.commit.interval.ms is hardcoded to zero. I believe it means the Kafka client commits/ACKs after every poll() when auto commit is enabled.

https://github.com/morganstanley/modern-cpp-kafka/blob/a146d10bcf166f55299c7a55728abaaea52cb0e5/include/kafka/KafkaConsumer.h#L355C15-L355C15

kenneth-jia commented 11 months ago

It's done on purpose, but not commit after the poll(), -- it would commit with the next poll().