Skip to content

Commit cf28da8

Browse files
authored
Improve docs for reconnect_backoff_max_ms (#1976)
1 parent b59323d commit cf28da8

File tree

5 files changed

+30
-25
lines changed

5 files changed

+30
-25
lines changed

kafka/admin/client.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@ class KafkaAdminClient(object):
6161
wait before attempting to reconnect to a given host.
6262
Default: 50.
6363
reconnect_backoff_max_ms (int): The maximum amount of time in
64-
milliseconds to wait when reconnecting to a broker that has
64+
milliseconds to backoff/wait when reconnecting to a broker that has
6565
repeatedly failed to connect. If provided, the backoff per host
6666
will increase exponentially for each consecutive connection
67-
failure, up to this maximum. To avoid connection storms, a
68-
randomization factor of 0.2 will be applied to the backoff
69-
resulting in a random range between 20% below and 20% above
70-
the computed value. Default: 1000.
67+
failure, up to this maximum. Once the maximum is reached,
68+
reconnection attempts will continue periodically with this fixed
69+
rate. To avoid connection storms, a randomization factor of 0.2
70+
will be applied to the backoff resulting in a random range between
71+
20% below and 20% above the computed value. Default: 1000.
7172
request_timeout_ms (int): Client request timeout in milliseconds.
7273
Default: 30000.
7374
connections_max_idle_ms: Close idle connections after the number of

kafka/client_async.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,14 @@ class KafkaClient(object):
6969
wait before attempting to reconnect to a given host.
7070
Default: 50.
7171
reconnect_backoff_max_ms (int): The maximum amount of time in
72-
milliseconds to wait when reconnecting to a broker that has
72+
milliseconds to backoff/wait when reconnecting to a broker that has
7373
repeatedly failed to connect. If provided, the backoff per host
7474
will increase exponentially for each consecutive connection
75-
failure, up to this maximum. To avoid connection storms, a
76-
randomization factor of 0.2 will be applied to the backoff
77-
resulting in a random range between 20% below and 20% above
78-
the computed value. Default: 1000.
75+
failure, up to this maximum. Once the maximum is reached,
76+
reconnection attempts will continue periodically with this fixed
77+
rate. To avoid connection storms, a randomization factor of 0.2
78+
will be applied to the backoff resulting in a random range between
79+
20% below and 20% above the computed value. Default: 1000.
7980
request_timeout_ms (int): Client request timeout in milliseconds.
8081
Default: 30000.
8182
connections_max_idle_ms: Close idle connections after the number of

kafka/conn.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,14 @@ class BrokerConnection(object):
111111
wait before attempting to reconnect to a given host.
112112
Default: 50.
113113
reconnect_backoff_max_ms (int): The maximum amount of time in
114-
milliseconds to wait when reconnecting to a broker that has
114+
milliseconds to backoff/wait when reconnecting to a broker that has
115115
repeatedly failed to connect. If provided, the backoff per host
116116
will increase exponentially for each consecutive connection
117-
failure, up to this maximum. To avoid connection storms, a
118-
randomization factor of 0.2 will be applied to the backoff
119-
resulting in a random range between 20% below and 20% above
120-
the computed value. Default: 1000.
117+
failure, up to this maximum. Once the maximum is reached,
118+
reconnection attempts will continue periodically with this fixed
119+
rate. To avoid connection storms, a randomization factor of 0.2
120+
will be applied to the backoff resulting in a random range between
121+
20% below and 20% above the computed value. Default: 1000.
121122
request_timeout_ms (int): Client request timeout in milliseconds.
122123
Default: 30000.
123124
max_in_flight_requests_per_connection (int): Requests are pipelined

kafka/consumer/group.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,14 @@ class KafkaConsumer(six.Iterator):
9191
wait before attempting to reconnect to a given host.
9292
Default: 50.
9393
reconnect_backoff_max_ms (int): The maximum amount of time in
94-
milliseconds to wait when reconnecting to a broker that has
94+
milliseconds to backoff/wait when reconnecting to a broker that has
9595
repeatedly failed to connect. If provided, the backoff per host
9696
will increase exponentially for each consecutive connection
97-
failure, up to this maximum. To avoid connection storms, a
98-
randomization factor of 0.2 will be applied to the backoff
99-
resulting in a random range between 20% below and 20% above
100-
the computed value. Default: 1000.
97+
failure, up to this maximum. Once the maximum is reached,
98+
reconnection attempts will continue periodically with this fixed
99+
rate. To avoid connection storms, a randomization factor of 0.2
100+
will be applied to the backoff resulting in a random range between
101+
20% below and 20% above the computed value. Default: 1000.
101102
max_in_flight_requests_per_connection (int): Requests are pipelined
102103
to kafka brokers up to this number of maximum requests per
103104
broker connection. Default: 5.

kafka/producer/kafka.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,14 @@ class KafkaProducer(object):
209209
wait before attempting to reconnect to a given host.
210210
Default: 50.
211211
reconnect_backoff_max_ms (int): The maximum amount of time in
212-
milliseconds to wait when reconnecting to a broker that has
212+
milliseconds to backoff/wait when reconnecting to a broker that has
213213
repeatedly failed to connect. If provided, the backoff per host
214214
will increase exponentially for each consecutive connection
215-
failure, up to this maximum. To avoid connection storms, a
216-
randomization factor of 0.2 will be applied to the backoff
217-
resulting in a random range between 20% below and 20% above
218-
the computed value. Default: 1000.
215+
failure, up to this maximum. Once the maximum is reached,
216+
reconnection attempts will continue periodically with this fixed
217+
rate. To avoid connection storms, a randomization factor of 0.2
218+
will be applied to the backoff resulting in a random range between
219+
20% below and 20% above the computed value. Default: 1000.
219220
max_in_flight_requests_per_connection (int): Requests are pipelined
220221
to kafka brokers up to this number of maximum requests per
221222
broker connection. Note that if this setting is set to be greater

0 commit comments

Comments
 (0)