[
https://issues.apache.org/jira/browse/KAFKA-3011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Bowman updated KAFKA-3011:
-------------------------------
Description:
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
was:
Because of this loop in ConsumerNetworkClient:
public void awaitMetadataUpdate() {
int version = this.metadata.requestUpdate();
do {
poll(Long.MAX_VALUE);
} while (this.metadata.version() == version);
}
...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
> 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)