Hi Yifan,
    You can try this procedure with kafka0.10, stop consumer group before do 
that.
    consumer.subscribe(Arrays.asList(topic));//consumer "enable.auto.commit" 
set false
    consumer.poll(1000);
    consumer.commitSync(offsets);//the offsets is to be updated consumer offset



Yuanjia Li
 
From: Yifan Ying
Date: 2016-10-15 01:53
To: users
Subject: Re: Manually update consumer offset stored in Kafka
Hi Jeff,
 
Could you explain how you send messages to __consumer_offsets to overwrite
offsets? Thanks!
 
Yifan
 
On Fri, Oct 14, 2016 at 9:55 AM, Jeff Widman <j...@netskope.com> wrote:
 
> I also would like to know this.
>
> Is the solution to just use a console producer against the internal topics
> that store the offsets?
>
> On Wed, Oct 12, 2016 at 2:26 PM, Yifan Ying <nafan...@gmail.com> wrote:
>
> > Hi,
> >
> > In old consumers, we use the following command line tool to manually
> update
> > offsets stored in zk:
> >
> > *./kafka-run-class.sh kafka.tools.UpdateOffsetsInZK [latest | earliest]
> > [consumer.properties file path] [topic]*
> >
> > But it doesn't work with offsets stored in Kafka. How can I update the
> > Kafka offsets to latest?
> >
> > Yifan
> >
> > --
> > Yifan
> >
>
 
 
 
-- 
Yifan

Reply via email to