diff options
| author | Will Daly <will@edx.org> | 2015-01-04 12:23:10 -0500 |
|---|---|---|
| committer | Will Daly <will.e.daly@gmail.com> | 2015-01-15 18:01:40 -0500 |
| commit | 01f378328e5383d05d52428b815f992eb2c536cb (patch) | |
| tree | 2d3366ed91b9744efd40d935a460040150c6d4d8 /kafka/producer/simple.py | |
| parent | 02c2b469003e2ddcb051dbb4d95977137050c19f (diff) | |
| download | kafka-python-01f378328e5383d05d52428b815f992eb2c536cb.tar.gz | |
Add Sphinx API docs
Diffstat (limited to 'kafka/producer/simple.py')
| -rw-r--r-- | kafka/producer/simple.py | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/kafka/producer/simple.py b/kafka/producer/simple.py index a10fa8c..019395c 100644 --- a/kafka/producer/simple.py +++ b/kafka/producer/simple.py @@ -19,21 +19,23 @@ class SimpleProducer(Producer): """ A simple, round-robin producer. Each message goes to exactly one partition - Params: - client - The Kafka client instance to use - async - If True, the messages are sent asynchronously via another + Arguments: + client: The Kafka client instance to use + + Keyword Arguments: + async: If True, the messages are sent asynchronously via another thread (process). We will not wait for a response to these - req_acks - A value indicating the acknowledgements that the server must - receive before responding to the request - ack_timeout - Value (in milliseconds) indicating a timeout for waiting - for an acknowledgement - batch_send - If True, messages are send in batches - batch_send_every_n - If set, messages are send in batches of this size - batch_send_every_t - If set, messages are send after this timeout - random_start - If true, randomize the initial partition which the - the first message block will be published to, otherwise - if false, the first message block will always publish - to partition 0 before cycling through each partition + req_acks: A value indicating the acknowledgements that the server must + receive before responding to the request + ack_timeout: Value (in milliseconds) indicating a timeout for waiting + for an acknowledgement + batch_send: If True, messages are send in batches + batch_send_every_n: If set, messages are send in batches of this size + batch_send_every_t: If set, messages are send after this timeout + random_start: If true, randomize the initial partition which the + the first message block will be published to, otherwise + if false, the first message block will always publish + to partition 0 before cycling through each partition """ def __init__(self, client, async=False, req_acks=Producer.ACK_AFTER_LOCAL_WRITE, |
