Sorry for the distraction. I think I had a typo in the property name:
it is auto.commit.enable
and not auto.commit.enabled (no 'd' at the end). It seems to be working as
expected with the correction.

Thanks
hemanth

On Fri, May 6, 2016 at 6:26 PM, Hemanth Yamijala <yhema...@gmail.com> wrote:

> Hi all,
>
> I am using Kafka 0.9.0.1 and the old high level consumer API. I wanted to
> implement atleast once semantics in my app, and looking around it seemed
> like the right way to do it is to:
>
> - set "auto.commit.enabled=false"  for the consumer properties.
> - Then, issue a ConsumerConnector.commitOffsets() (for now, I am issuing
> it after every message read using iterator.next() on the underlying
> stream). There is only a single partition / thread in the topic.
>
> In this setup, I stop the consumer abruptly after reading offset 'n', but
> before committing for this message.  When restarted, I expect the consumer
> to read this message again and continue. Is this expectation right?
>
> If yes, I am noticing that the consumer starts reading from message
> 'n+1'.  This is consistently happening in my test and so, I am thinking
> there's something wrong in what I am doing / expecting. Can someone please
> let me know if there's anything I need to correct (or) if this should work,
> how can I debug the problem.
>
> Thanks
> hemanth
>
>
>

Reply via email to