High level consumer commits before shutting down. If you'll look at ZookeeperConsumerConnector.scala (currently the only implementation of ConsumerConnector) you'll see shutdown() includes the following:
if (config.autoCommitEnable) commitOffsets() Gwen On Tue, Oct 28, 2014 at 11:44 AM, Bhavesh Mistry <mistry.p.bhav...@gmail.com> wrote: > Hi Kafka Team, > > What is expected behavior when you close *ConsumerConnector* and auto > commit is on ? Basically, when auto commit interval is set to 5 seconds > and shutdown is called (before 5 seconds elapses) does ConsumerConnector > commit the offset of message consumed by (next()) method or consumer will > get duplicate messages when it comes online after restart ? > > ConsumerConnector.shutdown(); > > Thanks, > > Bhavesh