Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 80134 invoked from network); 10 Oct 2009 23:40:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Oct 2009 23:40:06 -0000 Received: (qmail 94774 invoked by uid 500); 10 Oct 2009 23:40:06 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 94725 invoked by uid 500); 10 Oct 2009 23:40:06 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 94715 invoked by uid 99); 10 Oct 2009 23:40:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Oct 2009 23:40:06 +0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS 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; Sat, 10 Oct 2009 23:39:55 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MwlXC-0004xL-3Q for users@camel.apache.org; Sat, 10 Oct 2009 16:39:34 -0700 Message-ID: <25838615.post@talk.nabble.com> Date: Sat, 10 Oct 2009 16:39:34 -0700 (PDT) From: tide08 To: users@camel.apache.org Subject: Re: modify message before delivering to Dead Letter Queue In-Reply-To: <25828939.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sachin2_2k@yahoo.com References: <25827098.post@talk.nabble.com> <25828904.post@talk.nabble.com> <25828939.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org I would assume that uri would be available in header as per Camel-Http Documentation: HttpProducer.HTTP_URI - for v1.6.x Exchange.HTTP_URI - for v2.x or else as other approach you can just set header to distinguish between uri's avoiding custom processor for errorHandler itself. Something like - serviceone servicetwo All the best! terminator_007 wrote: > > thanks for the suggestion..i have one doubt here..how do i get the know in > the processor class which delivery has failed...i am delivering to two > destinations...so is there any property on the xchange message which will > tell me the delivery to which destination has failed ? > > tide08 wrote: >> >> You can register a processor which is invoked before message to DLQ. This >> can be achieved by property onRedelivery on DeadLetterChannelBuilder. So >> following should work - >> >> > class="org.apache.camel.builder.DeadLetterChannelBuilder"> >> >> > value="activemq:queue:queue.DeadLetter"/> >> > ref="myRedeliveryPolicyConfig"/> >> >> >> >> >> >> >> >> You can than manipulate message header before it goes to DLQ. >> >> Thanks! >> >> >> terminator_007 wrote: >>> >>> This is my configuration file >>> >>> >>> >>> >> class="org.apache.camel.builder.DeadLetterChannelBuilder"> >>> >> value="activemq:queue:queue.DeadLetter"/> >>> >> ref="myRedeliveryPolicyConfig"/> >>> >>> >>> >>> >>> >> class="org.apache.camel.processor.RedeliveryPolicy"> >>> >>> >>> >>> >>> >> xmlns="http://camel.apache.org/schema/spring" > >>> org.apache.camel.example.jmstofile >>> >>> >> uri="activemq:topic:topic.Patient?clientId=testCamelClient&durableSubscriptionName=zyz123"/> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> ref="myHttpConnectionManager"/> >>> >>> >>> >> class="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager"> >>> >>> >>> >>> >> class="org.apache.commons.httpclient.params.HttpConnectionManagerParams"> >>> >>> >>> >>> >>> here, if one of my "to" destination is down, I see two messages in the >>> DLQ. >>> also, i want to modify the message header with the name of the >>> destination that failed for example if service >>> "http://mpkl04l34h9g2:8080/servicetwo/subscriber" was down, I want to >>> add "http://mpkl04l34h9g2:8080/servicetwo/subscriber" to >>> messager/header/target before delivering the message to DLQ so that the >>> admin process which checks messages in DLQ knows which are the targets >>> which did not receive the message. >>> >>> Please suggest what can be done to achieve this. >>> >> >> > > -- View this message in context: http://www.nabble.com/modify-message-before-delivering-to-Dead-Letter-Queue-tp25827098p25838615.html Sent from the Camel - Users mailing list archive at Nabble.com.