Skip to content

Commit 754ff89

Browse files
committed
Improve KafkaProducer docstring re retries config
1 parent e50d4dd commit 754ff89

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

kafka/producer/kafka.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,12 @@ class KafkaProducer(object):
121121
retries (int): Setting a value greater than zero will cause the client
122122
to resend any record whose send fails with a potentially transient
123123
error. Note that this retry is no different than if the client
124-
resent the record upon receiving the error. Allowing retries will
125-
potentially change the ordering of records because if two records
124+
resent the record upon receiving the error. Allowing retries
125+
without setting max_in_flight_connections_per_connection to 1 will
126+
potentially change the ordering of records because if two batches
126127
are sent to a single partition, and the first fails and is retried
127-
but the second succeeds, then the second record may appear first.
128+
but the second succeeds, then the records in the second batch may
129+
appear first.
128130
Default: 0.
129131
batch_size (int): Requests sent to brokers will contain multiple
130132
batches, one for each partition with data available to be sent.

0 commit comments

Comments
 (0)