Closed
Description
Firstly: thanks (!) for writing this library.
I'm not sure if this is user error, a bug or a feature, but the following blocks indefinitely on the poll() command (no broker needed) in python2 and python3 on 1.3.5, 1.4.3, 1.4.5 as well as on 1.4.6.dev:
from kafka import KafkaConsumer, TopicPartition
# N.B. "yyy" does not resolve to any hostname on my network
consumer = KafkaConsumer(bootstrap_servers='yyy:9092', api_version='0.10.1')
consumer.assign([TopicPartition('zzz', 0)])
r_poll = consumer.poll(timeout_ms=1000)
I've also tested it by replacing "yyy" above with local hosts whose dns entries are defined but which have been turned off with the same results (blocks indefinitely). Adding group_id
to KafkaConsumer also doesn't seem to help.
P.S. Removing the api_version='0.10.1'
allows the KafkaConsumer() call to return immediately with no brokers available in 1.4.6.dev, blocks indefinitely on KafkaConsumer() in 1.4.5, returns immediately in 1.3.5.
Metadata
Metadata
Assignees
Labels
No labels