Skip to content

Commit

Permalink
Add more logs before sending to kafka
Browse files Browse the repository at this point in the history
  • Loading branch information
ChakshuGautam authored Apr 2, 2023
1 parent ad14f7b commit 2e73735
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ else if (msg.getPayload().getText().equals(assesmentGotostart)) {
}
msg.setSessionId(UUID.randomUUID());
msg.setPayload(payload);
log.info("CP-01", msg.toXML());
log.info("CP-01" + msg.toXML());
kafkaProducer.send(processOutbound, msg.toXML());
} else {

Expand Down Expand Up @@ -274,7 +274,7 @@ public Boolean apply(GenericMessageResponse response) {
}
msg.setPayload(payload);
try {
log.info("CP-02", msg.toXML());
log.info("CP-02" + msg.toXML());
kafkaProducer.send(processOutbound, msg.toXML());
} catch (JAXBException e) {
throw new RuntimeException(e);
Expand Down Expand Up @@ -304,7 +304,7 @@ private void sendWelcomeMessage(XMessagePayload payload, XMessage msg) throws JA
payload.setMedia(messageMedia);
}
msg.setPayload(payload);
log.info("CP-03", msg.toXML());
log.info("CP-03" + msg.toXML());
kafkaProducer.send(processOutbound, msg.toXML());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ public void accept(XMessage transformedMessage) {
if (transformedMessage.getTransformers() != null && transformedMessage.getTransformers().get(0) != null
&& transformedMessage.getTransformers().get(0).getMetaData() != null && transformedMessage.getTransformers().get(0).getMetaData().get("type") != null
&& transformedMessage.getTransformers().get(0).getMetaData().get("type").equals("generic")) {
log.info("CP-04" + transformedMessage.toXML());
kafkaProducer.send(genericTransformer, transformedMessage.toXML());

} else {
log.info("CP-05" + transformedMessage.toXML());
kafkaProducer.send(processOutboundTopic, transformedMessage.toXML());
}
long endTime = System.nanoTime();
Expand Down

0 comments on commit 2e73735

Please sign in to comment.