Re: Setting the consumer's offset

2013-04-02 Thread James Englert
I wrote some code herethat resets the offset. You just need to be sure to set this as the consumer(s) is starting up. I'm not certain if it is the "right way

Re: Consume from X messages ago

2013-03-22 Thread James Englert
mer/**SimpleConsumer.scala#L60< > > > > > > https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/consumer/SimpleConsumer.scala#L60 > > > > > > > > > > > > You will need to set earliestOrLatest to -1 for the latest offset. >

Re: Consume from X messages ago

2013-03-19 Thread James Englert
s exist of course, so you'd > need to handle that case. > > -David > > > On 3/19/13 11:04 AM, James Englert wrote: > >> Hi, >> >> I'm using Kafka 0.8. I would like to setup a consumer to fetch the last >> 10,000 messages and then start consuming

Consume from X messages ago

2013-03-19 Thread James Englert
Hi, I'm using Kafka 0.8. I would like to setup a consumer to fetch the last 10,000 messages and then start consuming messages. I see the configuration autooffset.reset, but that isn't quite what I want. I want only the last 10,000 messages. Is there a good way to achieve this in 0.8, besides j