Message History
The Message History from the EIP patterns allows for analyzing and debugging the flow of messages in a loosely coupled system.
Attaching a Message History to the message will provide a list of all applications that the message passed through since its origination.
In Camel you can trace message flow using the Tracer, or access information using the Java API from UnitOfWork using the getTracedRouteNodes
method.
When Camel sends a message to an endpoint that endpoint information is stored on the Exchange as a property with the key Exchange.TO_ENDPOINT
.
This property contains the last known endpoint the Exchange was sent to (it will be overridden when sending to new endpoint). Though it allows you to trace messages being sent using interceptors or the Event Notifier.
The Message History is scheduled for refactoring and improvement in Camel 3.0, to make it better and easier for end users to access details.
Using This Pattern
If you would like to use this EIP Pattern then please read the Getting Started, you may also find the Architecture useful particularly the description of Endpoint and URIs. Then you could try out some of the Examples first before trying this pattern out.