summaryrefslogtreecommitdiff
path: root/kafka/producer
diff options
context:
space:
mode:
authorJeff Widman <jeff@jeffwidman.com>2017-03-03 10:14:54 -0800
committerDana Powers <dana.powers@gmail.com>2017-03-03 10:14:54 -0800
commitd9283c14534dd56456e7a3f259f512fa57cc40ad (patch)
tree451818e8d3795fb6ea1012db89d322b87bdf5509 /kafka/producer
parentb1f22b882a338a3456ca88782e05660cffff72f6 (diff)
downloadkafka-python-d9283c14534dd56456e7a3f259f512fa57cc40ad.tar.gz
Add sphinx formatting to hyperlink methods (#898)
Diffstat (limited to 'kafka/producer')
-rw-r--r--kafka/producer/base.py8
-rw-r--r--kafka/producer/kafka.py16
2 files changed, 13 insertions, 11 deletions
diff --git a/kafka/producer/base.py b/kafka/producer/base.py
index 4079e22..8d067aa 100644
--- a/kafka/producer/base.py
+++ b/kafka/producer/base.py
@@ -56,7 +56,8 @@ def _send_upstream(queue, client, codec, batch_time, batch_size,
Messages placed on the queue should be tuples that conform to this format:
((topic, partition), message, key)
- Currently does not mark messages with task_done. Do not attempt to join()!
+ Currently does not mark messages with task_done. Do not attempt to
+ :meth:`join`!
Arguments:
queue (threading.Queue): the queue from which to get messages
@@ -227,7 +228,8 @@ class Producer(object):
Arguments:
client (kafka.SimpleClient): instance to use for broker
communications. If async=True, the background thread will use
- client.copy(), which is expected to return a thread-safe object.
+ :meth:`client.copy`, which is expected to return a thread-safe
+ object.
codec (kafka.protocol.ALL_CODECS): compression codec to use.
req_acks (int, optional): A value indicating the acknowledgements that
the server must receive before responding to the request,
@@ -263,7 +265,7 @@ class Producer(object):
will not allow you to identify the specific message that failed,
but it will allow you to match failures with retries.
async_stop_timeout (int or float, optional): seconds to continue
- attempting to send queued messages after producer.stop(),
+ attempting to send queued messages after :meth:`producer.stop`,
defaults to 30.
Deprecated Arguments:
diff --git a/kafka/producer/kafka.py b/kafka/producer/kafka.py
index 338a57a..d5a94ad 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.
- The send() method 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:`.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,9 +167,9 @@ 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 send() and
- partitions_for(). These methods can be blocked either because the
- buffer is full or metadata unavailable. Blocking in the
+ 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_request_size (int): The maximum size of a request. This is also
@@ -537,8 +537,8 @@ 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 flush() is that any previously sent record will have
- completed (e.g. Future.is_done() == True). A request is considered
+ 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.