Hi

Could you post your route, to help get a view of your problem?

To my knowledge the Exchange that is routed to DLC is the "original"
exchange as it was before it was processed by the node in the route
graph that failed. So if this node is a JMS producer the exchange
should have the JMS headers as well?

For example:
from(x).process(y).to("jms:zzz");

If the error happens in the (to jms:zzz) the Exchange that is routed
to DLQ is how the exchange looks like from the output of the
process(y) node.

But it helps if you could show the route and pin point where the error happens



/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/



On Tue, Dec 9, 2008 at 2:07 PM, efender <[EMAIL PROTECTED]> wrote:
>
> How can I record the original destination when routing to my DLQ?
>
> I've tried a custom processor which does this:
>
> public void process(Exchange exchange) throws Exception {
>        org.apache.camel.Message in = exchange.getIn();
>        org.apache.camel.Message out = in.copy();
>        out.setHeader("originalDestination", in.getHeader("JMSDestination"));
>        exchange.setProperty("originalDestination",
> in.getHeader("JMSDestination"));
>        exchange.setOut(out);
> }
>
> But neither the property nor the header is set in my bean which listens to
> the DLQ.  Do I need to modify/subclass
> org.apache.camel.processor.DeadLetterChannel to get this behavior?
>
> Also, I'd like to save the original Exception that caused the message to get
> routed to the DLQ as well.  I see that it is stored in
> org.apache.camel.processor.DeadLetterChannel.FAILURE_HANDLED and
> CamelCauseException, but those properties disappear by the time the message
> gets to the DLQ.
>
> Any recommendations on how to save this info in a best practice sort of way?
>
> Thanks.
> --
> View this message in context: 
> http://www.nabble.com/Saving-original-destination-when-sending-to-DLQ-tp20914367s22882p20914367.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Reply via email to