From 083bb2e843a6e9935cc1ef487a3bb6dcc4af775b Mon Sep 17 00:00:00 2001 From: pankajjangid05 Date: Fri, 26 May 2023 13:01:41 +0530 Subject: [PATCH] [Hot Fix] - Seprate notification logs for axiom --- .../outbound/consumers/OutboundKafkaController.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java b/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java index ec7c040..4500c6b 100644 --- a/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java +++ b/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java @@ -50,7 +50,7 @@ public class OutboundKafkaController { @Value("${spring.mail.recipient}") private String recipient; - private static long count = 0; + private long notificationCount, otherCount; @EventListener(ApplicationStartedEvent.class) public void onMessage() { @@ -128,9 +128,13 @@ public void accept(Throwable e) { @Override public void accept(XMessageDAO xMessageDAO) { log.info("XMessage Object saved is with sent user ID >> " + xMessageDAO.getUserId()); - count++; -// log.info("Insert Record in Cass : "+count); - logTimeTaken(startTime, 0, "Insert Record in Cass : " + count +" ::: process-end: %d ms"); + if(provider.toLowerCase().equals("firebase") && channel.toLowerCase().equals("web")){ + notificationCount++; + logTimeTaken(startTime, 0, "Notification Insert Record in Cass : " + notificationCount +" ::: process-end: %d ms"); + } else { + otherCount++; + logTimeTaken(startTime, 0, "Other Insert Record in Cass : " + otherCount +" ::: process-end: %d ms"); + } } }); } catch (Exception e) {