Skip to content

Commit

Permalink
[Hot Fix] - Added log for cassandra insert count
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajjangid05 committed May 16, 2023
1 parent e409eee commit 6a6914b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class CampaignController {
String topicFailure;

private long cassInsertCount;
private long cassInsertErrorCount;

@RequestMapping(value = "/start", method = RequestMethod.GET)
public ResponseEntity<String> startCampaign(@RequestParam("campaignId") String campaignId, @RequestParam(value = "page", required = false) String page) throws JsonProcessingException, JAXBException {
Expand Down Expand Up @@ -125,7 +126,9 @@ private void sendEventToKafka(XMessage xmsg) {
}

private Consumer<Throwable> genericError(String s) {
cassInsertErrorCount++;
return c -> {
log.info("Data not inserted in Cassandra Count : " + cassInsertErrorCount);
log.error(s + "::" + c.getMessage());
};
}
Expand Down

0 comments on commit 6a6914b

Please sign in to comment.