Skip to content

Commit 7e9b86b

Browse files
committed
Document api_version_auto_timeout_ms default; override in group tests
1 parent 6e1b9e5 commit 7e9b86b

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

kafka/client_async.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ class KafkaClient(object):
150150
api_version_auto_timeout_ms (int): number of milliseconds to throw a
151151
timeout exception from the constructor when checking the broker
152152
api version. Only applies if api_version set to None.
153+
Default: 2000
153154
selector (selectors.BaseSelector): Provide a specific selector
154155
implementation to use for I/O multiplexing.
155156
Default: selectors.DefaultSelector

kafka/consumer/group.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ class KafkaConsumer(six.Iterator):
224224
api_version_auto_timeout_ms (int): number of milliseconds to throw a
225225
timeout exception from the constructor when checking the broker
226226
api version. Only applies if api_version set to None.
227+
Default: 2000
227228
connections_max_idle_ms: Close idle connections after the number of
228229
milliseconds specified by this config. The broker closes idle
229230
connections after connections.max.idle.ms, so this avoids hitting

kafka/producer/kafka.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ class KafkaProducer(object):
272272
api_version_auto_timeout_ms (int): number of milliseconds to throw a
273273
timeout exception from the constructor when checking the broker
274274
api version. Only applies if api_version set to None.
275+
Default: 2000
275276
metric_reporters (list): A list of classes to use as metrics reporters.
276277
Implementing the AbstractMetricsReporter interface allows plugging
277278
in classes that will be notified of new metric creation. Default: []

test/test_consumer_group.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def consumer_thread(i):
5757
bootstrap_servers=connect_str,
5858
group_id=group_id,
5959
client_id="consumer_thread-%s" % i,
60+
api_version_auto_timeout_ms=30000,
6061
heartbeat_interval_ms=500)
6162
while not stop[i].is_set():
6263
for tp, records in six.itervalues(consumers[i].poll(timeout_ms=200)):
@@ -156,6 +157,7 @@ def test_heartbeat_thread(kafka_broker, topic):
156157
consumer = KafkaConsumer(topic,
157158
bootstrap_servers=get_connect_str(kafka_broker),
158159
group_id=group_id,
160+
api_version_auto_timeout_ms=30000,
159161
heartbeat_interval_ms=500)
160162

161163
# poll until we have joined group / have assignment

0 commit comments

Comments
 (0)