diff options
author | Dana Powers <dana.powers@gmail.com> | 2017-03-07 12:25:30 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2017-03-07 12:25:30 -0800 |
commit | 82d50f443e04356b2f051f7476bb4b4f5bd700d2 (patch) | |
tree | f58ae0b188b59d99155e69bf05866a55549749c3 /kafka/producer/kafka.py | |
parent | a4338169d4e87536ed2e81ce41d9276e2f3d73a9 (diff) | |
download | kafka-python-82d50f443e04356b2f051f7476bb4b4f5bd700d2.tar.gz |
Fixup :meth: sphinx documentation for use in KafkaConsumer.rst etc
Diffstat (limited to 'kafka/producer/kafka.py')
-rw-r--r-- | kafka/producer/kafka.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/kafka/producer/kafka.py b/kafka/producer/kafka.py index f137b4e..91e253b 100644 --- a/kafka/producer/kafka.py +++ b/kafka/producer/kafka.py @@ -35,9 +35,9 @@ class KafkaProducer(object): thread that is responsible for turning these records into requests and transmitting them to the cluster. - :meth:`.send` is asynchronous. When called it adds the record to a buffer of - pending record sends and immediately returns. This allows the producer to - batch together individual records for efficiency. + :meth:`~kafka.KafkaProducer.send` is asynchronous. When called it adds the + record to a buffer of pending record sends and immediately returns. This + allows the producer to batch together individual records for efficiency. The 'acks' config controls the criteria under which requests are considered complete. The "all" setting will result in blocking on the full commit of @@ -167,11 +167,12 @@ class KafkaProducer(object): will block up to max_block_ms, raising an exception on timeout. In the current implementation, this setting is an approximation. Default: 33554432 (32MB) - max_block_ms (int): Number of milliseconds to block during :meth:`.send` - and :meth:`.partitions_for`. These methods can be blocked either - because the buffer is full or metadata unavailable. Blocking in the - user-supplied serializers or partitioner will not be counted against - this timeout. Default: 60000. + max_block_ms (int): Number of milliseconds to block during + :meth:`~kafka.KafkaProducer.send` and + :meth:`~kafka.KafkaProducer.partitions_for`. These methods can be + blocked either because the buffer is full or metadata unavailable. + Blocking in the user-supplied serializers or partitioner will not be + counted against this timeout. Default: 60000. max_request_size (int): The maximum size of a request. This is also effectively a cap on the maximum record size. Note that the server has its own cap on record size which may be different from this. @@ -541,10 +542,11 @@ class KafkaProducer(object): Invoking this method makes all buffered records immediately available to send (even if linger_ms is greater than 0) and blocks on the completion of the requests associated with these records. The - post-condition of :meth:`.flush` is that any previously sent record will - have completed (e.g. Future.is_done() == True). A request is considered - completed when either it is successfully acknowledged according to the - 'acks' configuration for the producer, or it results in an error. + post-condition of :meth:`~kafka.KafkaProducer.flush` is that any + previously sent record will have completed + (e.g. Future.is_done() == True). A request is considered completed when + either it is successfully acknowledged according to the 'acks' + configuration for the producer, or it results in an error. Other threads can continue sending messages while one thread is blocked waiting for a flush call to complete; however, no guarantee is made |