> 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 <gshap...@cloudera.com> wrote: > 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 one of > the existing consumers? > If you use the high level consumer API, its default behavior for > hasNext() is to block. > > Gwen > > On Thu, Apr 16, 2015 at 10:19 PM, Ganesh Nikam <ganesh.ni...@gslab.com> > wrote: > > 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. when I send the fetch request with 101 offset, I did receive > > some response from broker, but I don't know what it is. > > I am not able to parse it. Can you please tell me what response does > broker > > sends, when there is no message on that partition ? > > > > I want to block my consumers till there is no message on the broker. How > can > > I do that ? > > > > - Ganesh >