diff options
author | Dana Powers <dana.powers@gmail.com> | 2015-01-23 09:41:03 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2015-01-23 09:41:03 -0800 |
commit | 587206ff6ad59ae01248d24ff9c9fadbdfc1c1fc (patch) | |
tree | a2d6f02a0c79ab3774527df39faf21deb4632936 /kafka/queue.py | |
parent | e6b37c00c5b0a52f821b35a4e26c0943f3e05b07 (diff) | |
parent | 01f378328e5383d05d52428b815f992eb2c536cb (diff) | |
download | kafka-python-587206ff6ad59ae01248d24ff9c9fadbdfc1c1fc.tar.gz |
Merge pull request #282 from wedaly/sphinx-api-docs
Add Sphinx API docs
Diffstat (limited to 'kafka/queue.py')
-rw-r--r-- | kafka/queue.py | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/kafka/queue.py b/kafka/queue.py index ada495f..26cafad 100644 --- a/kafka/queue.py +++ b/kafka/queue.py @@ -129,13 +129,12 @@ class KafkaQueue(object): Messages are buffered in the producer thread until producer_flush_timeout or producer_flush_buffer is reached. - Params - ====== - client: KafkaClient object - topic: str, the topic name - partitions: list of ints, the partions to consume from - producer_config: dict, see below - consumer_config: dict, see below + Arguments: + client: KafkaClient object + topic: str, the topic name + partitions: list of ints, the partions to consume from + producer_config: dict, see below + consumer_config: dict, see below Consumer Config =============== @@ -184,14 +183,12 @@ class KafkaQueue(object): """ Consume a message from Kafka - Params - ====== - block: boolean, default True - timeout: int, number of seconds to wait when blocking, default None + Arguments: + block: boolean, default True + timeout: int, number of seconds to wait when blocking, default None - Returns - ======= - msg: str, the payload from Kafka + Returns: + msg: str, the payload from Kafka """ return self.in_queue.get(block, timeout).payload @@ -199,11 +196,10 @@ class KafkaQueue(object): """ Send a message to Kafka - Params - ====== - msg: std, the message to send - block: boolean, default True - timeout: int, number of seconds to wait when blocking, default None + Arguments: + msg: std, the message to send + block: boolean, default True + timeout: int, number of seconds to wait when blocking, default None """ self.out_queue.put(msg, block, timeout) |