We noticed a difference in Camel's Jms message handling after updating Camel from 2.15.3 to 2.16.1. In our logs we sometimes see messages like these with Camel 2.16.1:
Failed delivery for (MessageId: ID-xxx on ExchangeId: ID-xxx). On delivery attempt: 0 caught: org.apache.camel.CamelExchangeException: Error occurred in ResponseHandler. Exchange[ID-xxx][Message: <message body is printed here>]. Caused by: [java.io.IOException - Connection reset by peer] or Failed delivery for (MessageId: ID-xxx on ExchangeId: ID-xxx). On delivery attempt: 0 caught: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis. Exchange[ID-xxx][Message: <message body is printed here>] With 2.15.3 the message looked like this: Failed delivery for (MessageId: xxx on ExchangeId: ID-xxx). On delivery attempt: 0 caught: org.apache.camel.CamelExchangeException: Error occurred in ResponseHandler. Exchange[JmsMessage[JmsMessageID: ID:xxx]]. Caused by: [java.io.IOException - Connection reset by peer] Note the difference in the Exchange part of the message. I've tried to find the cause of the change, but got a bit lost in Camel's source code. What I've found so far is: - toString is used to append the Exchange and the containing Message to the exception message - the toString implementation of JmsMessage looks like "JmsMessage[JmsMessageID: ...]" (consistent with the message we see in 2.15.3) - the toString implementation of DefaultMessage looks like "[Message: <message body here>]" (consistent with the message we see in 2.16.1) I can't figure out what exactly has changed here, we didn't change anything except the camel version. Does anyone have a clue? The code of the toString implementation of JmsMessage actually has a comment "do not print jmsMessage as there could be sensitive details". Why is this only an issue with JmsMessage, but not in other messages? We don't want message bodies in our logs because they may contain sensitive data, so this is a problem for us. We've reverted back to 2.15.3 for now. Thanks, Gijsbert -- View this message in context: http://camel.465427.n5.nabble.com/Change-in-exception-messages-between-2-15-3-and-2-16-1-message-bodies-are-logged-tp5776788.html Sent from the Camel - Users mailing list archive at Nabble.com.