Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ public void setHeader(String headerName, String headerValue, Message message) {
}
try {
message.setStringProperty(headerName, headerValue);
} catch (MessageNotWriteableException e) {
logger.debug("Failed to set JMS message property {} due to read-only message", headerName, e);
} catch (JMSException e) {
logger.warn("Failed to set JMS message property {}. Distributed tracing may not work.", headerName);
logger.debug("Detailed error: ", e);
} catch (Exception e) {
if (logger.isDebugEnabled()) {
logger.debug(String.format("Failed to set JMS message property %s. This may indicate a real problem that " +
"can prevent from distributed tracing from working, but it may also be a valid scenario.", headerName), e);
Comment on lines +85 to +88
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] We did not added a test for this case when doing this previous try/catch block with MessageNotWriteableException. It might be worth adding it this time
as it's already the 2cnd time we revisit this code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we have no indication it is still a problem. Apparently, the user that reported this warning message was using an older version, so the 1.23.0 change to debug may be sufficient.
So I will close this one now and we'll fix that if indeed required.

}
}
}
}