How do I log the original message sent into a camel route?
Issue
How do I store the original message that came into the route in order to log it?
For example, I'd like to replace "I'M IN SLAVE MODE - DO NOTHING" with the actual message:
<route>
<from uri="direct:processOrders"/>
<bean method="isMaster" ref="hasingleton"/>
<choice>
<when>
<simple>${body} == true</simple>
<to uri="file:c:/out/messages/?fileExist=Append&fileName=messages.txt"/>
</when>
<otherwise>
<log message="********* I'M IN SLAVE MODE - DO NOTHING"/>
</otherwise>
</choice>
</route>
Environment
- JBoss Fuse 6.X
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.