From 92635d9bfff5593ba865003dd3010a0feb280140 Mon Sep 17 00:00:00 2001 From: Braedon Vickers Date: Thu, 22 Feb 2018 07:00:19 +1300 Subject: Correctly respect timeouts in consumer poll interface (#1384) --- kafka/consumer/group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py index 1c1f1e8..debbd2d 100644 --- a/kafka/consumer/group.py +++ b/kafka/consumer/group.py @@ -642,7 +642,7 @@ class KafkaConsumer(six.Iterator): # Send any new fetches (won't resend pending fetches) self._fetcher.send_fetches() - timeout_ms = min(timeout_ms, self._coordinator.time_to_next_poll()) + timeout_ms = min(timeout_ms, self._coordinator.time_to_next_poll() * 1000) self._client.poll(timeout_ms=timeout_ms) # after the long poll, we should check whether the group needs to rebalance # prior to returning data so that the group can stabilize faster -- cgit v1.2.1