I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications.
[App A] -> [App B] -> [App C]
We set a global id in the message header so we can trace each message lifecycle through the system.
I would like to be able to prepend any log message in the system with the message global id.
Has anyone else done this? Is there any way to associate this variable to the Thread so I can access it in future methods? I'd rather not pass the variable around in methods of the system.