Hello, You can turn of auto.commit.offset and manually call connector.commitOffset() manually after you have processed the data. One thing to remember is that the commit frequency is related to ZK (in the future, Kafka) writes and hence you may not want to commit after processed every single message but only a batch of messages.
Guozhang On Tue, Nov 4, 2014 at 10:42 PM, Chia-Chun Shih <chiachun.s...@gmail.com> wrote: > Hi, > > I am a new to Kafka. In my understanding, high-level consumer ( > ZookeeperConsumerConnector) changes offset when message is drawn > by ConsumerIterator. But I would like to change offset when message is > processed, not when message is drawn from broker. So if a consumer dies > before a message is completely processed, the message will be processed > again. Is it possible? > > Thanks. > -- -- Guozhang