kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Borschenko <aborsche...@elance-odesk.com>
Subject Re: what response does broker send when there is not message on the partition
Date Mon, 20 Apr 2015 10:46:33 GMT
> 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 <gshapira@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.nikam@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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message