Can not use useOriginalMessage in DeadLetterChannelBuilder

Solution Verified - Updated -

Issue

We have a deadLetterChannel errorHandler with useOriginalMessage for a route that listens on direct endpoint like below.

<bean class="org.apache.camel.builder.DeadLetterChannelBuilder" id="DLCErrorHandler">
    <property name="deadLetterUri" value="direct:DLC.ERROR" ></property>
    <property name="useOriginalMessage" value="true" ></property>
</bean>

<camelContext id="sample" xmlns="http://camel.apache.org/schema/blueprint">
<route errorHandlerRef="DLCErrorHandler" id="editMessage">
    <from id="_from1" uri="direct:editMessage" ></from>
    <log id="_log1" message="Message Received is ${body}" ></log>
</route>
</camelContext>

But it is not working as expected when it is called by another route. Whenever any exception occurs in route editMessage, the original message received by direct endpoint is not sent to DLC.ERROR.

Environment

  • Red Hat JBoss Fuse
    • 6.3.0

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
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.