summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kafka/consumer.py6
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):