Re: what response does broker send when there is not message on the partition

2015-04-21 Thread Gwen Shapira
So "offsetRequest" should give you what you need. Or the SimpleConsumer getOffsetsBefore. You don't really need a specific consumer for this - just a topic, partition and timestamp. On Tue, Apr 21, 2015 at 12:12 AM, Alexey Borschenko wrote: > We trying to implement *offset rewind* procedure. For

Re: what response does broker send when there is not message on the partition

2015-04-21 Thread Alexey Borschenko
We trying to implement *offset rewind* procedure. For this we need to be able to get offset for topic and partition for specified timestamp. On Tue, Apr 21, 2015 at 4:36 AM, Gwen Shapira wrote: > I believe it doesn't take consumers into account at all. Just the > offset available on the partitio

Re: what response does broker send when there is not message on the partition

2015-04-20 Thread Gwen Shapira
I believe it doesn't take consumers into account at all. Just the offset available on the partition. Why would you need it to? On Mon, Apr 20, 2015 at 3:46 AM, Alexey Borschenko wrote: >> You can also send a FetchOffsetRequest and check for the last >> available offset (log end offset) - this way

Re: what response does broker send when there is not message on the partition

2015-04-20 Thread Alexey Borschenko
> You can also send a FetchOffsetRequest and check for the last > available offset (log end offset) - this way you won't have to send a > fetch request that is likely to fail. Does this takes in account specific consumer offsets stored in Zookeeper? On Fri, Apr 17, 2015 at 5:57 PM, Gwen Shapira

Re: what response does broker send when there is not message on the partition

2015-04-17 Thread Gwen Shapira
You should receive OffsetOutOfRange code (1) for the partition. You can also send a FetchOffsetRequest and check for the last available offset (log end offset) - this way you won't have to send a fetch request that is likely to fail. Are you implementing your own consumer from scatch? or using on

what response does broker send when there is not message on the partition

2015-04-17 Thread Ganesh Nikam
Hi All, I have the kafka client which is fetching data from particular partition. On the broker there are there are some messages (say 100) on this partition and producers has stop producing the messages. Now my consumer consumers these 100 messages and the next fetch offset is set to 101. wh