Skip to content

Commit bcd5539

Browse files
committed
Add doc string for SimpleConsumer._get_message()
1 parent e0f7262 commit bcd5539

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

kafka/consumer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,12 @@ def get_message(self, block=True, timeout=0.1, get_partition_info=None):
350350

351351
def _get_message(self, block=True, timeout=0.1, get_partition_info=None,
352352
update_offset=True):
353+
"""
354+
If no messages can be fetched, returns None.
355+
If get_partition_info is None, it defaults to self.partition_info
356+
If get_partition_info is True, returns (partition, message)
357+
If get_partition_info is False, returns message
358+
"""
353359
if self.queue.empty():
354360
# We're out of messages, go grab some more.
355361
with FetchContext(self, block, timeout):

0 commit comments

Comments
 (0)