From ea2972e6f3d8624af0d1edacdf8a240348af549a Mon Sep 17 00:00:00 2001 From: Samir Gondzetovic Date: Wed, 27 Jun 2018 21:36:17 +0100 Subject: [PATCH] upgrade bus api format --- src/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index 430951f..95a4595 100644 --- a/src/app.js +++ b/src/app.js @@ -46,7 +46,8 @@ function startKafkaConsumer(handlers, notificationServiceHandlers) { // return null to ignore this message return null; } - 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 handlerAsync(topicName, messageJSON)