Btw, I've also tried moving the message processing part into a seperate route
and accessing it via a direct URI (see below) thinking that might solve my
problem, but still not getting the behaviour I'm looking for, which is xml
message being passed to the dead letter channel. Still getting a POJO
instead of the XML message. I'm still confused on what I'm doing
wrong...any other suggestions I can try?
<camel:camelContext id="globalCamelContext" errorHandlerRef="defaultEH">
<camel:errorHandler id="defaultEH" />
<camel:errorHandler id="deadLetterEH" type="DeadLetterChannel"
deadLetterUri="direct:dealLetterChannel"
useOriginalMessage="true" />
<camel:endpoint id="jmsMQReceiverEndPoint"
uri="jms:queue:receiver?testConnectionOnStartup=true&disableReplyTo=true&exchangePattern=InOnly"
/>
<camel:endpoint id="jmsMQErrorEndPoint"
uri="jms:queue:$error?testConnectionOnStartup=true&disableReplyTo=true"
/>
<camel:route id="messageRoute" errorHandlerRef="deadLetterEH" >
<camel:from ref="jmsMQReceiverEndPoint" />
<camel:log message="Request message came ${id} ${body}" />
<camel:to uri="direct:messageProcessor" />
</camel:route>
<camel:route id="processMessage" >
<camel:from uri="direct:messageProcessor" />
<camel:to uri="bean:Marshaller?method=processPayload" />
<camel:to uri="bean:Converter?method=processPayload" />
<camel:to uri="bean:Enricher?method=processPayload" />
<camel:to uri="bean:Persister?method=processPayload" />
</camel:route>
<camel:route id="deadLetterRoute" >
<camel:from uri="direct:dealLetterChannel" />
<camel:log message="Message in error: ${id} ${body}" />
<camel:to ref="jmsMQErrorEndPoint" />
</camel:route>
</camel:camelContext>
--
View this message in context:
http://camel.465427.n5.nabble.com/DeadLetterChannel-useOriginalMessage-Behaviour-tp4728373p4730527.html
Sent from the Camel - Users mailing list archive at Nabble.com.