diff --git a/kafka/client_async.py b/kafka/client_async.py index a9704fafd..5a16f6bba 100644 --- a/kafka/client_async.py +++ b/kafka/client_async.py @@ -79,6 +79,11 @@ class KafkaClient(object): the computed value. Default: 1000. request_timeout_ms (int): Client request timeout in milliseconds. Default: 30000. + connections_max_idle_ms: Close idle connections after the number of + milliseconds specified by this config. The broker closes idle + connections after connections.max.idle.ms, so this avoids hitting + unexpected socket disconnected errors on the client. + Default: 540000 retry_backoff_ms (int): Milliseconds to backoff when retrying on errors. Default: 100. max_in_flight_requests_per_connection (int): Requests are pipelined diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py index 9abf15e9b..1c3ec6385 100644 --- a/kafka/consumer/group.py +++ b/kafka/consumer/group.py @@ -212,6 +212,11 @@ class KafkaConsumer(six.Iterator): api_version_auto_timeout_ms (int): number of milliseconds to throw a timeout exception from the constructor when checking the broker api version. Only applies if api_version set to 'auto' + connections_max_idle_ms: Close idle connections after the number of + milliseconds specified by this config. The broker closes idle + connections after connections.max.idle.ms, so this avoids hitting + unexpected socket disconnected errors on the client. + Default: 540000 metric_reporters (list): A list of classes to use as metrics reporters. Implementing the AbstractMetricsReporter interface allows plugging in classes that will be notified of new metric creation. Default: [] diff --git a/kafka/producer/kafka.py b/kafka/producer/kafka.py index 7d52bdfa7..719acef59 100644 --- a/kafka/producer/kafka.py +++ b/kafka/producer/kafka.py @@ -171,6 +171,11 @@ class KafkaProducer(object): will block up to max_block_ms, raising an exception on timeout. In the current implementation, this setting is an approximation. Default: 33554432 (32MB) + connections_max_idle_ms: Close idle connections after the number of + milliseconds specified by this config. The broker closes idle + connections after connections.max.idle.ms, so this avoids hitting + unexpected socket disconnected errors on the client. + Default: 540000 max_block_ms (int): Number of milliseconds to block during :meth:`~kafka.KafkaProducer.send` and :meth:`~kafka.KafkaProducer.partitions_for`. These methods can be