From 754ff8954e2ab149cfa2b79cd21c85b84602e7c8 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sat, 20 Aug 2016 17:41:45 -0700 Subject: Improve KafkaProducer docstring re retries config --- kafka/producer/kafka.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'kafka') diff --git a/kafka/producer/kafka.py b/kafka/producer/kafka.py index 84039f6..3927a72 100644 --- a/kafka/producer/kafka.py +++ b/kafka/producer/kafka.py @@ -121,10 +121,12 @@ class KafkaProducer(object): retries (int): Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error. Note that this retry is no different than if the client - resent the record upon receiving the error. Allowing retries will - potentially change the ordering of records because if two records + resent the record upon receiving the error. Allowing retries + without setting max_in_flight_connections_per_connection to 1 will + potentially change the ordering of records because if two batches are sent to a single partition, and the first fails and is retried - but the second succeeds, then the second record may appear first. + but the second succeeds, then the records in the second batch may + appear first. Default: 0. batch_size (int): Requests sent to brokers will contain multiple batches, one for each partition with data available to be sent. -- cgit v1.2.1