diff options
author | Dana Powers <dana.powers@rd.io> | 2015-04-05 18:32:47 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@rd.io> | 2015-04-06 10:42:36 -0700 |
commit | 94f4c9e4c4a6503884527f90908ba092a7f7586c (patch) | |
tree | 45aed421d6581e4bf37aeb0cf529bc9be6547bc6 /kafka/client.py | |
parent | fdec16dc45c6e83d53538478282a00ab428b113c (diff) | |
download | kafka-python-94f4c9e4c4a6503884527f90908ba092a7f7586c.tar.gz |
Improve send_produce_request docstring
Diffstat (limited to 'kafka/client.py')
-rw-r--r-- | kafka/client.py | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/kafka/client.py b/kafka/client.py index 08d74d7..9eb8a0d 100644 --- a/kafka/client.py +++ b/kafka/client.py @@ -420,14 +420,25 @@ class KafkaClient(object): same order as the list of payloads specified Arguments: - payloads: list of ProduceRequest - fail_on_error: boolean, should we raise an Exception if we - encounter an API error? - callback: function, instead of returning the ProduceResponse, - first pass it through this function + payloads (list of ProduceRequest): produce requests to send to kafka + acks (int, optional): how many acks the servers should receive from replica + brokers before responding to the request. If it is 0, the server + will not send any response. If it is 1, the server will wait + until the data is written to the local log before sending a + response. If it is -1, the server will wait until the message + is committed by all in-sync replicas before sending a response. + For any value > 1, the server will wait for this number of acks to + occur (but the server will never wait for more acknowledgements than + there are in-sync replicas). defaults to 1. + timeout (int, optional): maximum time in milliseconds the server can + await the receipt of the number of acks, defaults to 1000. + fail_on_error (bool, optional): raise exceptions on connection and + server response errors, defaults to True. + callback (function, optional): instead of returning the ProduceResponse, + first pass it through this function, defaults to None. Returns: - list of ProduceResponse or callback(ProduceResponse), in the + list of ProduceResponses, or callback results if supplied, in the order of input payloads """ |