Skip to content

Commit 92635d9

Browse files
braedondpkp
authored andcommitted
Correctly respect timeouts in consumer poll interface (#1384)
1 parent f5a0e40 commit 92635d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka/consumer/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ def _poll_once(self, timeout_ms, max_records):
642642
# Send any new fetches (won't resend pending fetches)
643643
self._fetcher.send_fetches()
644644

645-
timeout_ms = min(timeout_ms, self._coordinator.time_to_next_poll())
645+
timeout_ms = min(timeout_ms, self._coordinator.time_to_next_poll() * 1000)
646646
self._client.poll(timeout_ms=timeout_ms)
647647
# after the long poll, we should check whether the group needs to rebalance
648648
# prior to returning data so that the group can stabilize faster

0 commit comments

Comments
 (0)