Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0BE55DDD0 for ; Mon, 17 Dec 2012 11:38:18 +0000 (UTC) Received: (qmail 89165 invoked by uid 500); 17 Dec 2012 11:38:17 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 89117 invoked by uid 500); 17 Dec 2012 11:38:17 -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 89093 invoked by uid 99); 17 Dec 2012 11:38:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2012 11:38:16 +0000 X-ASF-Spam-Status: No, hits=4.2 required=5.0 tests=HTML_MESSAGE,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of eugenio.perrottaneto@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Dec 2012 11:38:11 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TkZ15-0001Fo-68 for users@camel.apache.org; Mon, 17 Dec 2012 03:37:51 -0800 Date: Mon, 17 Dec 2012 03:37:51 -0800 (PST) From: Eugenio Perrotta Neto To: users@camel.apache.org Message-ID: In-Reply-To: <8DBED40705E8415888A7BD0EE68E233C@gmail.com> References: <1355691228984-5724183.post@n5.nabble.com> <8DBED40705E8415888A7BD0EE68E233C@gmail.com> Subject: =?UTF-8?Q?Re:_execute_an_action_on_excep?= =?UTF-8?Q?tion_and_use_rede=C3=A7ivery_Policy?= MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_47225_28480893.1355744271184" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_47225_28480893.1355744271184 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I used, but I could not rethrow the exception to be catched or treated by an onexception clause! On Sun, Dec 16, 2012 at 11:42 PM, Willem.Jiang [via Camel] < ml-node+s465427n5724185h65@n5.nabble.com> wrote: > Hi, > > Did you try to use the "try =E2=80=A6 catch" DSL[1] > > [1]http://camel.apache.org/try-catch-finally.html > > -- > Willem Jiang > > Red Hat, Inc. > FuseSource is now part of Red Hat > Web: http://www.fusesource.com | http://www.redhat.com > Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) > (English) > http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) > Twitter: willemjiang > Weibo: =E5=A7=9C=E5=AE=81willem > > > > > > On Monday, December 17, 2012 at 4:53 AM, Eugenio Perrotta Neto wrote: > > > Hello. Its the first time i'm writing on this forum. I read everyday to > solve > > my question and always was very useful for me. But know i'm facing a > biiiiig > > problem. I will try to explain: > > > > > > I want to create a route that listens to a queue of ActiveMQ. > > > > from("activwmq:queue:myQueue"); > > > > I want each message, only one processing is performed > > > > from("activwmq:queue:myQueue") > > .processRef("myProcessor"); > > > > in this processor, for any exception throwed i want to redelivery this > > message to the route for x times and with y miliseconds of delay: > > > > from("activmq:queue:myQueue") > > > .onException(Exception.class).maximumRedeliveries(x).redeliveryDelay(y).e= nd() > > > .processRef("myProcessor"); > > > > So far so good. > > > > my problem is:I would like to run a processor when an exception was > throwed > > and not when it was done redelivery. > > > > Run a processor on rede=C3=A7livery is very easy. Just use the > onRedelivery(). > > Run a processor when the exception was throwed is easy to. Just use > doTry > > and tocatch. > > > > > > But execute when a execute a processor on catch the message is not > > redelivery. > > > > can someone help me? I'm sorry for my English. I am from Brazil > > > > thanks > > > > > > > > > > > > -- > > View this message in context: > http://camel.465427.n5.nabble.com/execute-an-action-on-exception-and-use-= redecivery-Policy-tp5724183.html > > Sent from the Camel - Users mailing list archive at Nabble.com ( > http://Nabble.com). > > > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://camel.465427.n5.nabble.com/execute-an-action-on-exception-and-use-= redecivery-Policy-tp5724183p5724185.html > To unsubscribe from execute an action on exception and use rede=C3=A7ive= ry > Policy, click here > . > NAML > --=20 Eugenio Perrotta Neto Tel: (27) 9913-8080 -- View this message in context: http://camel.465427.n5.nabble.com/execute-an-= action-on-exception-and-use-redecivery-Policy-tp5724183p5724230.html Sent from the Camel - Users mailing list archive at Nabble.com. ------=_Part_47225_28480893.1355744271184--