summaryrefslogtreecommitdiff
path: root/kafka/consumer/group.py
diff options
context:
space:
mode:
Diffstat (limited to 'kafka/consumer/group.py')
-rw-r--r--kafka/consumer/group.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py
index bde283c..67e352a 100644
--- a/kafka/consumer/group.py
+++ b/kafka/consumer/group.py
@@ -585,5 +585,8 @@ class KafkaConsumer(object):
# init any new fetches (won't resend pending fetches)
self._fetcher.init_fetches()
self._client.poll(self.config['request_timeout_ms'] / 1000.0)
+ timeout = time.time() + self.config['heartbeat_interval_ms'] / 1000.0
for msg in self._fetcher:
yield msg
+ if time.time() > timeout:
+ break