From 83c738d34cc912f0674fd5b832cce21e9ac8cbf9 Mon Sep 17 00:00:00 2001 From: pankajjangid05 Date: Wed, 24 May 2023 20:34:05 +0530 Subject: [PATCH] [Hot Fix] - added switchFromTo method in broadcast transformer --- .../java/com/uci/orchestrator/Consumer/ReactiveConsumer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/uci/orchestrator/Consumer/ReactiveConsumer.java b/src/main/java/com/uci/orchestrator/Consumer/ReactiveConsumer.java index 11350ea..addf485 100644 --- a/src/main/java/com/uci/orchestrator/Consumer/ReactiveConsumer.java +++ b/src/main/java/com/uci/orchestrator/Consumer/ReactiveConsumer.java @@ -133,6 +133,8 @@ public void accept(XMessage msg) { // msg.setFrom(from); try { if (firstTransformer.findValue("type") != null && firstTransformer.findValue("type").asText().equals(BotUtil.transformerTypeBroadcast)) { + /* Switch From & To */ + switchFromTo(msg); Integer chunkSize = null; try { chunkSize = Integer.parseInt(broadcastNotificationChunkSize); @@ -164,7 +166,7 @@ public void accept(XMessage msg) { kafkaProducer.send(broadcastTransformerTopic, msg.toXML()); } notificationProcessedCount++; - log.info("Notification processed : " + notificationProcessedCount); + logTimeTaken(startTime, 0, "Notification processed : " + notificationProcessedCount + " :: process-end: %d ms"); } else { getLastMessageID(msg) .doOnNext(lastMessageID -> { @@ -260,6 +262,7 @@ private XMessage setXMessageTransformers(XMessage xMessage, JsonNode botNode) { : ""); if (transformerMeta.get("type") != null && transformerMeta.get("type").asText().equals(BotUtil.transformerTypeBroadcast)) { if(xMessage != null && xMessage.getFrom() != null && xMessage.getFrom().getMeta() != null && xMessage.getFrom().getMeta().containsKey("page")){ + log.info("page number orch : "+ xMessage.getFrom().getMeta().get("page")); metaData.put("federatedUsers", getFederatedUsersMeta(botNode, transformer, xMessage.getFrom().getMeta().get("page"))); } else{ metaData.put("federatedUsers", getFederatedUsersMeta(botNode, transformer, null));