[ https://issues.apache.org/jira/browse/KAFKA-3011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15070305#comment-15070305 ]
Ewen Cheslack-Postava commented on KAFKA-3011: ---------------------------------------------- [~ebowman] I think this is a duplicate of KAFKA-1894? > Consumer.poll(0) blocks if Kafka not accessible > ----------------------------------------------- > > Key: KAFKA-3011 > URL: https://issues.apache.org/jira/browse/KAFKA-3011 > Project: Kafka > Issue Type: Bug > Components: clients > Affects Versions: 0.9.0.0 > Environment: all > Reporter: Eric Bowman > > Because of this loop in ConsumerNetworkClient: > {code:java} > public void awaitMetadataUpdate() { > int version = this.metadata.requestUpdate(); > do { > poll(Long.MAX_VALUE); > } while (this.metadata.version() == version); > } > {code} > ...if Kafka is not reachable (perhaps not running, or other network issues, > unclear), then KafkaConsumer.poll(0) will block until it's available. > I suspect that better behavior would be an exception -- This message was sent by Atlassian JIRA (v6.3.4#6332)