diff --git a/connect/connectNotificationServer.js b/connect/connectNotificationServer.js index 2bb28c2..00107ea 100644 --- a/connect/connectNotificationServer.js +++ b/connect/connectNotificationServer.js @@ -95,14 +95,14 @@ const getNotificationsForMentionedUser = (logger, eventConfig, content) => { notification.userId = mentionedUser ? mentionedUser.userId.toString() : notification.userHandle; }); resolve(notifications); - }).catch((error) => { + })/*.catch((error) => { if (logger) { logger.error(error); logger.info('Unable to send notification to mentioned user') } //resolves with empty notification which essentially means we are unable to send notification to mentioned user resolve([]); - }); + })*/; } else { resolve([]); } diff --git a/src/app.js b/src/app.js index 12826a1..ccdbbb3 100644 --- a/src/app.js +++ b/src/app.js @@ -76,7 +76,9 @@ function startKafkaConsumer(handlers, notificationServiceHandlers) { }); const check = function () { + logger.debug('Checking Health...') ; if (!consumer.client.initialBrokers && !consumer.client.initialBrokers.length) { + logger.debug('Found unhealthy Kafka Brokers...'); return false; } let connected = true; @@ -84,6 +86,7 @@ function startKafkaConsumer(handlers, notificationServiceHandlers) { logger.debug(`url ${conn.server()} - connected=${conn.connected}`); connected = conn.connected & connected; }); + logger.debug('Found all Kafka Brokers healthy...'); return connected; };