diff --git a/config/kafka.js b/config/kafka.js index 34b7a90f..b2858422 100644 --- a/config/kafka.js +++ b/config/kafka.js @@ -73,6 +73,10 @@ var _sendToKafkaConsumers = function (topic,host) { consumer.on('message', async function (message) { + console.log("-------Kafka log starts here------------------"); + console.log("Topic Name: ", topic); + console.log("Message: ", JSON.stringify(message)); + console.log("-------Kafka log ends here------------------"); if (message && message.topic === SUBMISSION_TOPIC) { submissionsConsumer.messageReceived(message); diff --git a/generics/kafka/producers.js b/generics/kafka/producers.js index b32404aa..066bc8cf 100644 --- a/generics/kafka/producers.js +++ b/generics/kafka/producers.js @@ -49,6 +49,11 @@ const pushMessageToKafka = function(payload) { throw reject("Kafka configuration is not done"); } + console.log("-------Kafka log starts here------------------"); + console.log("Topic Name: ", payload[0].topic); + console.log("Message: ", JSON.stringify(payload)); + console.log("-------Kafka log ends here------------------"); + kafkaClient.kafkaProducer.send(payload, (err, data) => { if (err) { return reject("Kafka push to topic "+ payload[0].topic +" failed.");