Skip to content

Commit 083bb2e

Browse files
[Hot Fix] - Seprate notification logs for axiom
1 parent 46e05f4 commit 083bb2e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class OutboundKafkaController {
5050
@Value("${spring.mail.recipient}")
5151
private String recipient;
5252

53-
private static long count = 0;
53+
private long notificationCount, otherCount;
5454

5555
@EventListener(ApplicationStartedEvent.class)
5656
public void onMessage() {
@@ -128,9 +128,13 @@ public void accept(Throwable e) {
128128
@Override
129129
public void accept(XMessageDAO xMessageDAO) {
130130
log.info("XMessage Object saved is with sent user ID >> " + xMessageDAO.getUserId());
131-
count++;
132-
// log.info("Insert Record in Cass : "+count);
133-
logTimeTaken(startTime, 0, "Insert Record in Cass : " + count +" ::: process-end: %d ms");
131+
if(provider.toLowerCase().equals("firebase") && channel.toLowerCase().equals("web")){
132+
notificationCount++;
133+
logTimeTaken(startTime, 0, "Notification Insert Record in Cass : " + notificationCount +" ::: process-end: %d ms");
134+
} else {
135+
otherCount++;
136+
logTimeTaken(startTime, 0, "Other Insert Record in Cass : " + otherCount +" ::: process-end: %d ms");
137+
}
134138
}
135139
});
136140
} catch (Exception e) {

0 commit comments

Comments
 (0)