summaryrefslogtreecommitdiff
path: root/kafka/consumer/base.py
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2015-01-23 09:41:03 -0800
committerDana Powers <dana.powers@gmail.com>2015-01-23 09:41:03 -0800
commit587206ff6ad59ae01248d24ff9c9fadbdfc1c1fc (patch)
treea2d6f02a0c79ab3774527df39faf21deb4632936 /kafka/consumer/base.py
parente6b37c00c5b0a52f821b35a4e26c0943f3e05b07 (diff)
parent01f378328e5383d05d52428b815f992eb2c536cb (diff)
downloadkafka-python-587206ff6ad59ae01248d24ff9c9fadbdfc1c1fc.tar.gz
Merge pull request #282 from wedaly/sphinx-api-docs
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()