Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 10487 invoked from network); 9 Dec 2008 13:08:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Dec 2008 13:08:06 -0000 Received: (qmail 322 invoked by uid 500); 9 Dec 2008 13:08:19 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 303 invoked by uid 500); 9 Dec 2008 13:08:19 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 292 invoked by uid 99); 9 Dec 2008 13:08:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 05:08:19 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 13:08:04 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LA2JR-0004FR-Rj for camel-user@activemq.apache.org; Tue, 09 Dec 2008 05:07:41 -0800 Message-ID: <20914367.post@talk.nabble.com> Date: Tue, 9 Dec 2008 05:07:41 -0800 (PST) From: efender To: camel-user@activemq.apache.org Subject: Saving original destination when sending to DLQ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: eric+nabble@fender.net X-Virus-Checked: Checked by ClamAV on apache.org 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.