camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From efender <>
Subject Saving original destination when sending to DLQ
Date Tue, 09 Dec 2008 13:07:41 GMT

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"));

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?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message