Skip to content

Commit 20024e3

Browse files
author
Vikas Agarwal
committed
Logging in health endpoint
1 parent 6583bbc commit 20024e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,17 @@ function startKafkaConsumer(handlers, notificationServiceHandlers) {
7676
});
7777

7878
const check = function () {
79+
logger.debug('Checking Health...') ;
7980
if (!consumer.client.initialBrokers && !consumer.client.initialBrokers.length) {
81+
logger.debug('Found unhealthy Kafka Brokers...');
8082
return false;
8183
}
8284
let connected = true;
8385
consumer.client.initialBrokers.forEach(conn => {
8486
logger.debug(`url ${conn.server()} - connected=${conn.connected}`);
8587
connected = conn.connected & connected;
8688
});
89+
logger.debug('Found all Kafka Brokers healthy...');
8790
return connected;
8891
};
8992

0 commit comments

Comments
 (0)