kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guozhang Wang <wangg...@gmail.com>
Subject Re: a consumer question
Date Wed, 18 Dec 2013 00:57:36 GMT
If there is no more messages, hasNext will return false instead of throwing
an exception.

Guozhang


On Tue, Dec 17, 2013 at 11:53 AM, Yu, Libo <libo.yu@citi.com> wrote:

> Sorry, a typo. Correct my question. When consumer.timeout.ms is set to 0,
>  if there is no
> message available, hasNext() throws a timeout exception, otherwise it
> returns true.
> Is that the right behavior?
>
> Regards,
>
> Libo
>
>
> -----Original Message-----
> From: Jun Rao [mailto:junrao@gmail.com]
> Sent: Tuesday, December 17, 2013 12:40 AM
> To: users@kafka.apache.org
> Subject: Re: a consumer question
>
> If there is a message, hasNext() returns true, not throwing an exception.
>
> Thanks,
>
> Jun
>
>
> On Mon, Dec 16, 2013 at 11:29 AM, Yu, Libo <libo.yu@citi.com> wrote:
>
> > Hi folks,
> >
> > For this parameters, if consumer.timeout.ms is set to 0, whenever I
> > call ConsumerIterator's hasNext(), if there is a message available, a
> > timeout exception will be thrown. Is my understanding correct? Thanks.
> >
> > consumer.timeout.ms
> >
> > -1
> >
> > Throw a timeout exception to the consumer if no message is available
> > for consumption after the specified interval
> >
> >
> >
> > Regards,
> >
> > Libo
> >
> >
>



-- 
-- Guozhang

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