Skip to content

Commit

Permalink
Merge pull request #71 from shikshalokam/kafka_logs
Browse files Browse the repository at this point in the history
log updated
  • Loading branch information
aks30 authored Feb 4, 2022
2 parents dd6cc85 + 4a8bdfb commit 8cc9a28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions config/kafkaConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ var connect = function() {

consumer.on('message', async function (message) {

console.log("-------Kafka log starts here------------------");
console.log("-------Kafka consumer log starts here------------------");
console.log("Topic Name: ", process.env.SUBMISSION_RATING_QUEUE_TOPIC);
console.log(JSON.stringify(message));
console.log("-------Kafka log ends here------------------");
console.log("-------Kafka consumer log ends here------------------");

submissionRatingQueueConsumer.messageReceived(message)
submissionRatingQueueConsumer.messageReceived(message)
});

consumer.on('error', async function (error) {
Expand Down
4 changes: 2 additions & 2 deletions generics/helpers/kafkaCommunications.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ const pushMessageToKafka = function(payload) {
throw reject("Kafka configuration is not done")
}

console.log("-------Kafka log starts here------------------");
console.log("-------Kafka producer log starts here------------------");
console.log("Topic Name: ", payload[0].topic);
console.log(JSON.stringify(payload));
console.log("-------Kafka log ends here------------------");
console.log("-------Kafka producer log ends here------------------");

kafkaClient.kafkaProducer.send(payload, (err, data) => {
if (err) {
Expand Down

0 comments on commit 8cc9a28

Please sign in to comment.