From f4c28adcd16c4d55cb1476c68ab8ab23411bae9b Mon Sep 17 00:00:00 2001 From: Sachin Maheshwari Date: Fri, 6 Apr 2018 15:20:29 +0530 Subject: [PATCH] supporting new bus event format. --- src/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index 9cd88ec..250f5b1 100644 --- a/src/app.js +++ b/src/app.js @@ -51,7 +51,8 @@ function configureKafkaConsumer(handlers) { return null; } let emailModel = {}; - const messageJSON = JSON.parse(message); + const busPayload = JSON.parse(message); + const messageJSON = busPayload.payload; const handlerAsync = Promise.promisify(handler); // use handler to create notification instances for each recipient return models.Email.create(