Skip to content

Commit 9051aab

Browse files
author
Sachin Maheshwari
committed
increasing max-bytes option for kafka consumer client
1 parent df0db01 commit 9051aab

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

config/default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module.exports = {
2121

2222
VALID_ISSUERS: process.env.VALID_ISSUERS,
2323
KAFKA_URL: process.env.KAFKA_URL,
24+
KAFKA_MAXBYTES: process.env.MAXBYTES || 2097152 /** 2MB /*,
2425
KAFKA_GROUP_ID: process.env.KAFKA_GROUP_ID,
2526
KAFKA_CLIENT_CERT: process.env.KAFKA_CLIENT_CERT ? process.env.KAFKA_CLIENT_CERT.replace('\\n', '\n') : null,
2627
KAFKA_CLIENT_CERT_KEY: process.env.KAFKA_CLIENT_CERT_KEY ?

src/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let emailTries = {};
2626
*/
2727
function configureKafkaConsumer(handlers) {
2828
// create group consumer
29-
const options = { groupId: config.KAFKA_GROUP_ID, connectionString: config.KAFKA_URL };
29+
const options = { groupId: config.KAFKA_GROUP_ID, connectionString: config.KAFKA_URL, maxBytes:config.KAFKA_MAXBYTES };
3030
if (config.KAFKA_CLIENT_CERT && config.KAFKA_CLIENT_CERT_KEY) {
3131
options.ssl = { cert: config.KAFKA_CLIENT_CERT, key: config.KAFKA_CLIENT_CERT_KEY };
3232
}

0 commit comments

Comments
 (0)