diff options
author | Yu Kou <ckyoog@gmail.com> | 2018-02-08 23:39:52 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2018-02-08 23:39:52 -0800 |
commit | 990e9285342dd921ddba472868dbd852a7b69689 (patch) | |
tree | 27f42e1939e9c4691af8a7750a7a1a672cc07226 | |
parent | 8655c75e6a147080235d3458ec82edb9e1ff78a6 (diff) | |
download | kafka-python-990e9285342dd921ddba472868dbd852a7b69689.tar.gz |
Fix consumer poll stuck error when no available partition (#1375)
-rw-r--r-- | kafka/coordinator/consumer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kafka/coordinator/consumer.py b/kafka/coordinator/consumer.py index 7a22c61..9076f61 100644 --- a/kafka/coordinator/consumer.py +++ b/kafka/coordinator/consumer.py @@ -462,7 +462,7 @@ class ConsumerCoordinator(BaseCoordinator): # its completion). Note that commits are treated as heartbeats by the # coordinator, so there is no need to explicitly allow heartbeats # through delayed task execution. - self._client.poll() # no wakeup if we add that feature + self._client.poll(timeout_ms=0) # no wakeup if we add that feature def _do_commit_offsets_async(self, offsets, callback=None): assert self.config['api_version'] >= (0, 8, 1), 'Unsupported Broker API' |