RE: read message use SimpleConsumer,can not start with assign offset

2014-08-25 Thread chenlax
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 > >

RE: read message use SimpleConsumer,can not start with assign offset

2014-08-25 Thread chenlax
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

Re: read message use SimpleConsumer,can not start with assign offset

2014-08-24 Thread Jun Rao
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

RE: read message use SimpleConsumer,can not start with assign offset

2014-08-24 Thread chenlax
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.

Re: read message use SimpleConsumer,can not start with assign offset

2014-08-24 Thread Jun Rao
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

RE: read message use SimpleConsumer,can not start with assign offset

2014-08-24 Thread chenlax
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

Re: read message use SimpleConsumer,can not start with assign offset

2014-08-22 Thread Jun Rao
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.

read message use SimpleConsumer,can not start with assign offset

2014-08-22 Thread chenlax
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