def _get_next_kafka_message(
self,
blocking,
has_timeout,
max_time
):
""" Helper function which will retry when encountering an IOError with
the errno of EINTR. This is now standard behavior in Python3.5. For
more details see https://www.python.org/dev/peps/pep-0475/
"""
while not self._break_consume_loop(blocking, has_timeout, max_time):
try:
return self.consumer_group.next()
except IOError as e:
if e.errno != errno.EINTR:
raise
return None
评论列表
文章目录