kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhavesh Mistry <mistry.p.bhav...@gmail.com>
Subject Re: High Level Consumer and Close with Auto Commit On
Date Tue, 28 Oct 2014 19:27:18 GMT
HI Gwen,

Thanks for info appreciate. Sometime, I have observed duplicated events...
so that is why I ask.

Thanks,

Bhavesh

On Tue, Oct 28, 2014 at 11:51 AM, Gwen Shapira <gshapira@cloudera.com>
wrote:

> 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.bhavesh@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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message