thanks junrao.
it can't use assign offset to get the last offset,my mistake.
Thanks,
Lax
> Date: Sun, 24 Aug 2014 21:41:47 -0700
> Subject: Re: read message use SimpleConsumer,can not start with assign offset
> From: jun...@gmail.com
> To: users@kafka.apache.org
>
>
s, it's "return offsets[0]".whichTime is a long num, is message offset i
> > cached,and the kafka keep message 7days.
> >
> > Thanks,
> > Lax
> >
> >
> > > Date: Sun, 24 Aug 2014 19:58:35 -0700
> > > Subject: Re: read message use S
Lax
>
>
> > Date: Sun, 24 Aug 2014 19:58:35 -0700
> > Subject: Re: read message use SimpleConsumer,can not start with assign
> offset
> > From: jun...@gmail.com
> > To: users@kafka.apache.org
> >
> > Is line 64 "return offsets[0]"? What valu
yes, it's "return offsets[0]".whichTime is a long num, is message offset i
cached,and the kafka keep message 7days.
Thanks,
Lax
> Date: Sun, 24 Aug 2014 19:58:35 -0700
> Subject: Re: read message use SimpleConsumer,can not start with assign offset
> From: jun.
ring() );
> return 0;
> }
> long[] offsets = response.offsets(topic, partition);
> return offsets[0];
> }
>
> Thanks,
> Lax
>
>
> > Date: Fri, 22 Aug 2014 21:27:58 -0700
> > Subject: Re: read messag
ode(topic, partition) + " | " + response.toString()
);
return 0;
}
long[] offsets = response.offsets(topic, partition);
return offsets[0];
}
Thanks,
Lax
> Date: Fri, 22 Aug 2014 21:27:58 -0700
> Subject: Re: read message use SimpleConsu
What's code in line 164 of SimpleConsumerClient.getLastOffset()?
Thanks,
Jun
On Fri, Aug 22, 2014 at 7:36 AM, chenlax wrote:
> kafka version is 0.8.0, the code as
> https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+SimpleConsumer+Example
>
> when i assign a offset ,it will throw
> java.
kafka version is 0.8.0, the code as
https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+SimpleConsumer+Example
when i assign a offset ,it will throw java.lang.ArrayIndexOutOfBoundsException:
0
java.lang.ArrayIndexOutOfBoundsException: 0
at
com.chen.test.consumer.SimpleConsumerClie