def next(self):
self._set_consumer_timeout_start()<EOL>while True:<EOL><INDENT>try:<EOL><INDENT>return six.next(self._get_message_iterator())<EOL><DEDENT>except StopIteration:<EOL><INDENT>self._reset_message_iterator()<EOL><DEDENT>self._check_consumer_timeout()<EOL><DEDENT>
Return the next available message

        Blocks indefinitely unless consumer_timeout_ms > 0

        Returns:
            a single KafkaMessage from the message iterator

        Raises:
            ConsumerTimeout after consumer_timeout_ms and no message

        Note:
            This is also the method called internally during iteration