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: redeliveryPolicy -: How can we retry from start of the route in case of exception occurred inbetween of route?
Date Thu, 23 Aug 2012 06:49:39 GMT
Hi

You can use a separate route for the ssh logic, and in that route
disable error handling.
Then Camel will redeliver that route.

I created a FAQ entry with an example
https://cwiki.apache.org/confluence/display/CAMEL/How+do+I+retry+processing+a+message+from+a+certain+point+back+or+an+entire+route

On Thu, Aug 23, 2012 at 8:04 AM, sarfaraj <sarfarajsayyad@gmail.com> wrote:
> Let me ask you specific question.
>
> I have below component in my camel route.
>
>
> *<process ref="prepareSshProcessor" id="sshPrepare" />
> <to uri="ssh://root:xxxxx@myserver.com:22" />
> <process ref="sshResultProcessor" id="sshResult" />*
>
> Once the ssh execute we get the result in "sshResultProcessor"; After that
> on some condition we throws custom exception.
> What happen here only "sshResultProcessor" retries 2 using redeliveryPolicy
> . But we want to retry from ssh.
>
> Can you have any idea, how to do it ?
>
> FYI...here is the onException block
>
> <onException>
>                         <exception>com.exception.MyException
>                         </exception>
>                         <redeliveryPolicy redeliveryDelay="1000"
>                                 maximumRedeliveries="2" retryAttemptedLogLevel="WARN"
/>
>                         <continued>
>                                 <constant>true</constant>
>                         </continued>
>                         <process ref="exceptionProcessor" id="exceptionHandler" />
>                 </onException>
>
>
> /Sarfaraj
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/redeliveryPolicy-How-can-we-retry-from-start-of-the-route-in-case-of-exception-occurred-inbetween-of-tp5717848p5717912.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message