def loop(self):

    while True:
      messages = self.consume()

      if messages and isinstance(messages, list) and len(messages) > 0:
        for message in messages:
          yield message

      time.sleep(self.polling)

  # REQUEST TYPE ID + TOPIC LENGTH + TOPIC + PARTITION + OFFSET + MAX SIZE
Loop over incoming messages from the queue in a blocking fashion. Set `polling` for the check interval in seconds.
dataset/ETHPy150Open harelba/tail2kafka/kafka/consumer.py/Consumer.loop