kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jun Rao <...@confluent.io>
Subject Re: Detecting lost connection in high level consumer
Date Tue, 03 Feb 2015 05:42:29 GMT
That's actually how consumer.timeout.ms works. The iterator only gets an
exception is there is no message after the timeout. The error handling of
the connection is done in the consumer client library for you.



On Wed, Jan 28, 2015 at 6:21 PM, harikiran <harihawking@gmail.com> wrote:

> Hi
> I am using the 0811 Kafka High level consumer and I have configured "
> consumer.timeout.ms" to a value that is not -1, say 5000ms.
> I create the consumer iterator and invoke hasNext() method on it.
> Irrespective of whether kafka broker was shutdown or there was no message
> written to kafka, I see a ConsumerTimeOut exception after 5000ms.
> My goal is to detect lost connection and reconnect but I cannot figure out
> a way.
> Any kind of help is appreciated.
> Thanks
> Hari

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