[06.10.20] Moved setting of correlationID to before first logging as it was generating a random ID on receiving a message

This commit is contained in:
andyjk15 2020-10-06 19:29:16 +01:00
parent a396b0f002
commit 81b988e7b8

View File

@ -58,10 +58,11 @@ public class PriceConsumer {
String correlationId = getCorrelationId(message); String correlationId = getCorrelationId(message);
String syncId = UUID.randomUUID().toString(); String syncId = UUID.randomUUID().toString();
setCorrelationId(correlationId);
logger.info("Received Message: " + message.getBody(String.class)); logger.info("Received Message: " + message.getBody(String.class));
try { try {
setCorrelationId(correlationId);
if (message.getBody(String.class) == null | message.getBody(String.class).equals("")) { if (message.getBody(String.class) == null | message.getBody(String.class).equals("")) {
throw new NoBodyOrStringException(); throw new NoBodyOrStringException();