summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kafka/producer/kafka.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/kafka/producer/kafka.py b/kafka/producer/kafka.py
index 578a4cb..f319e4a 100644
--- a/kafka/producer/kafka.py
+++ b/kafka/producer/kafka.py
@@ -93,22 +93,23 @@ class KafkaProducer(object):
the leader to have received before considering a request complete.
This controls the durability of records that are sent. The
following settings are common:
- 0: Producer will not wait for any acknowledgment from the server
- at all. The message will immediately be added to the socket
+
+ 0: Producer will not wait for any acknowledgment from the server.
+ The message will immediately be added to the socket
buffer and considered sent. No guarantee can be made that the
server has received the record in this case, and the retries
configuration will not take effect (as the client won't
generally know of any failures). The offset given back for each
record will always be set to -1.
- 1: The broker leader will write the record to its local log but
- will respond without awaiting full acknowledgement from all
- followers. In this case should the leader fail immediately
+ 1: Wait for leader to write the record to its local log only.
+ Broker will respond without awaiting full acknowledgement from
+ all followers. In this case should the leader fail immediately
after acknowledging the record but before the followers have
replicated it then the record will be lost.
- all: The broker leader will wait for the full set of in-sync
- replicas to acknowledge the record. This guarantees that the
- record will not be lost as long as at least one in-sync replica
- remains alive. This is the strongest available guarantee.
+ all: Wait for the full set of in-sync replicas to write the record.
+ This guarantees that the record will not be lost as long as at
+ least one in-sync replica remains alive. This is the strongest
+ available guarantee.
If unset, defaults to acks=1.
compression_type (str): The compression type for all data generated by
the producer. Valid values are 'gzip', 'snappy', 'lz4', or None.