diff options
author | Omar Ghishan <omar.ghishan@rd.io> | 2014-01-20 11:41:44 -0800 |
---|---|---|
committer | Omar Ghishan <omar.ghishan@rd.io> | 2014-01-20 11:41:44 -0800 |
commit | bcd5539cb61f948a8ee51efc965c038d6604be9d (patch) | |
tree | 620db3ee3e710cd0488b3b6588cfe654b48e3a0f | |
parent | e0f726204ab0b8b8ae5c29ae07c1aa369a5a6906 (diff) | |
download | kafka-python-bcd5539cb61f948a8ee51efc965c038d6604be9d.tar.gz |
Add doc string for SimpleConsumer._get_message()
-rw-r--r-- | kafka/consumer.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kafka/consumer.py b/kafka/consumer.py index 12e1af6..8d2c2b0 100644 --- a/kafka/consumer.py +++ b/kafka/consumer.py @@ -350,6 +350,12 @@ class SimpleConsumer(Consumer): def _get_message(self, block=True, timeout=0.1, get_partition_info=None, update_offset=True): + """ + If no messages can be fetched, returns None. + If get_partition_info is None, it defaults to self.partition_info + If get_partition_info is True, returns (partition, message) + If get_partition_info is False, returns message + """ if self.queue.empty(): # We're out of messages, go grab some more. with FetchContext(self, block, timeout): |