From 9583f46b1a03ff5e5b86f4650e80eb11f2b75885 Mon Sep 17 00:00:00 2001 From: Emanuele Sabellico Date: Fri, 29 Sep 2023 10:50:47 +0200 Subject: [PATCH 1/2] Increase connection timeout being closer to the defaults in KIP-601 --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index d6369d7eb..cda1aec7d 100644 --- a/src/index.js +++ b/src/index.js @@ -40,7 +40,7 @@ module.exports = class Client { * @param {Object} options.ssl * @param {Object} options.sasl * @param {string} options.clientId - * @param {number} [options.connectionTimeout=1000] - in milliseconds + * @param {number} [options.connectionTimeout=10000] - in milliseconds * @param {number} options.authenticationTimeout - in milliseconds * @param {number} options.reauthenticationThreshold - in milliseconds * @param {number} [options.requestTimeout=30000] - in milliseconds @@ -53,7 +53,7 @@ module.exports = class Client { ssl, sasl, clientId, - connectionTimeout = 1000, + connectionTimeout = 10000, authenticationTimeout, reauthenticationThreshold, requestTimeout, From 4360f54385377fa3e993f54a029615040d4741f7 Mon Sep 17 00:00:00 2001 From: Emanuele Sabellico Date: Fri, 29 Sep 2023 13:11:25 +0200 Subject: [PATCH 2/2] Change default value in documentation --- docs/Configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index a40cb7d1c..67b00c80c 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -284,7 +284,7 @@ authentication mechanism. ## Connection Timeout -Time in milliseconds to wait for a successful connection. The default value is: `1000`. +Time in milliseconds to wait for a successful connection. The default value is: `10000`. ```javascript new Kafka({