kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ewen Cheslack-Postava <e...@confluent.io>
Subject Re: KafkaConsumer blocks indefinitely when server settings are wrong
Date Wed, 03 Aug 2016 05:04:14 GMT
This is unfortunate, but a known issue. See
https://issues.apache.org/jira/browse/KAFKA-1894 The producer suffers from
a similar issue with its initial metadata fetch on the first send().

-Ewen

On Thu, Jul 28, 2016 at 12:46 PM, Oleg Zhurakousky <
ozhurakousky@hortonworks.com> wrote:

> Also, reading java docs for KafkaConsumer#poll(timeout) states:
>
> @param timeout The time, in milliseconds, spent waiting in poll if data is
> not available. If 0, returns
>      *            immediately with any records that are available now.
> Must not be negative.
>
> Yet even setting it to 0 brings no joy.
>
> Cheers
> Oleg
>
> On Jul 28, 2016, at 3:43 PM, Oleg Zhurakousky <
> ozhurakousky@hortonworks.com<mailto:ozhurakousky@hortonworks.com>> wrote:
>
> So I have KafkaConsumer that is deliberately set with server properties
> pointing to non-running broker.
> Doing KafkaConsumer.poll(100) blocks infinitely even though ‘
> fetch.max.wait.ms’ is set to 1 millisecond.
>
> Basically I am trying to fail when connection is not possible.
> Any idea how to accomplish that?
>
> Cheers
> Oleg
>
>
>


-- 
Thanks,
Ewen

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