File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/main/java/com/uci/outbound/consumers Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public class OutboundKafkaController {
50
50
@ Value ("${spring.mail.recipient}" )
51
51
private String recipient ;
52
52
53
- private static long count = 0 ;
53
+ private long notificationCount , otherCount ;
54
54
55
55
@ EventListener (ApplicationStartedEvent .class )
56
56
public void onMessage () {
@@ -128,9 +128,13 @@ public void accept(Throwable e) {
128
128
@ Override
129
129
public void accept (XMessageDAO xMessageDAO ) {
130
130
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
+ }
134
138
}
135
139
});
136
140
} catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments