Monday, 19 August 2019

kafka commit and acknoledge

if you set auto commit to false

config.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false);

and you set act model to manual:


that means you need to call


manually to let kafka knows you have processed the data. otherwise, kafka will send you this message again if you restart.

when the auto commit is true, kafka will auto ack once you consumed the message.

No comments:

Post a comment