3
votes

As per Kafka documentation, default value of consumer config enable.auto.commit is true. But I am getting as false.

In my Kafka stream application, I try to change this to true as props.put(StreamsConfig.consumerPrefix(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG), true) to commit offset automatically. But I am getting WARN o.a.k.s.StreamsConfig [main] Unexpected user-specified consumer config: enable.auto.commit found. User setting (true) will be ignored and the Streams default setting (false) will be used message in log and reverting back to false.

What would be the reason? Please help me.

1

1 Answers

7
votes

Kafka Streams does not allow users to set enable.auto.commit. Streams uses its own mechanism for committing offset instead of relying on the Consumer auto commit feature. This is to ensure commit are only done at certain points when the library is sure no data will be lost.

The only commit setting you can control is commit.interval.ms.