in pulsar/__init__.py [0:0]
def read_next(self, timeout_millis=None):
"""
Read a single message.
If a message is not immediately available, this method will block until
a new message is available.
Parameters
----------
timeout_millis: int, optional
If specified, the receiver will raise an exception if a message is not available within the timeout.
"""
if timeout_millis is None:
msg = self._reader.read_next()
else:
_check_type(int, timeout_millis, 'timeout_millis')
msg = self._reader.read_next(timeout_millis)
m = Message()
m._message = msg
m._schema = self._schema
return m