How do I log the original message sent into a camel route?

Solution Verified - Updated -


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:

        <from uri="direct:processOrders"/>
        <bean method="isMaster" ref="hasingleton"/>
                <simple>${body} == true</simple>
                <to uri="file:c:/out/messages/?fileExist=Append&amp;fileName=messages.txt"/>
                <log message="********* I'M IN SLAVE MODE - DO NOTHING"/>


  • JBoss Fuse 6.X

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In