summaryrefslogtreecommitdiff
path: root/kafka/consumer/base.py
diff options
context:
space:
mode:
authorWill Daly <will@edx.org>2015-01-04 12:23:10 -0500
committerWill Daly <will.e.daly@gmail.com>2015-01-15 18:01:40 -0500
commit01f378328e5383d05d52428b815f992eb2c536cb (patch)
tree2d3366ed91b9744efd40d935a460040150c6d4d8 /kafka/consumer/base.py
parent02c2b469003e2ddcb051dbb4d95977137050c19f (diff)
downloadkafka-python-01f378328e5383d05d52428b815f992eb2c536cb.tar.gz
Add Sphinx API docs
Diffstat (limited to 'kafka/consumer/base.py')
-rw-r--r--kafka/consumer/base.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/kafka/consumer/base.py b/kafka/consumer/base.py
index 2464aaf..9cdcf89 100644
--- a/kafka/consumer/base.py
+++ b/kafka/consumer/base.py
@@ -32,9 +32,11 @@ class Consumer(object):
Base class to be used by other consumers. Not to be used directly
This base class provides logic for
+
* initialization and fetching metadata of partitions
* Auto-commit logic
* APIs for fetching pending message count
+
"""
def __init__(self, client, group, topic, partitions=None, auto_commit=True,
auto_commit_every_n=AUTO_COMMIT_MSG_COUNT,
@@ -93,8 +95,9 @@ class Consumer(object):
"""
Commit offsets for this consumer
- partitions: list of partitions to commit, default is to commit
- all of them
+ Keyword Arguments:
+ partitions (list): list of partitions to commit, default is to commit
+ all of them
"""
# short circuit if nothing happened. This check is kept outside
@@ -148,7 +151,8 @@ class Consumer(object):
"""
Gets the pending message count
- partitions: list of partitions to check for, default is to check all
+ Keyword Arguments:
+ partitions (list): list of partitions to check for, default is to check all
"""
if not partitions:
partitions = self.offsets.keys()