camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Consumer Polling Retry Issue
Date Fri, 27 Mar 2015 15:39:53 GMT
Take a look at
org.apache.camel.impl.LimitedPollingConsumerPollStrategy

On Wed, Mar 25, 2015 at 6:07 PM, yeandone <willcoursera@gmail.com> wrote:
> Hi Claus.
>
>
>   Thank you so much for your reply! I read of the doc before, but how do I
> catch the exception and handle it after 5 retries? Currently in my route I
> set consumer.bridgeErrorHandler=true. So when an exception is thrown at the
> first try, it will go to my "on exception" block inside the route and the
> error handling logic will be executed. So retries can never be executed.
>
>
>
> Route:
>                 <route id="connect_route" autoStartup="false">
>
>                 <from
> uri="{{sftpLocation}}?privateKeyFile={{location}}&amp;sendEmptyMessageWhenIdle=true&amp;idempotent=false&amp;consumer.bridgeErrorHandler=true&amp;disconnect=false&amp;maximumReconnectAttempts=2&amp;filter=#customFileFilter"/>
>                 ...........
>                    <onException>
>                         <exception>java.lang.Exception</exception>
>                         <to uri="controlbus:route?routeId=connect_route&amp;action=stop"
> />
>                    </onException>
>
>                 </route>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Consumer-Polling-Retry-Issue-tp5764711p5764779.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message