camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mayank Garkoti <mani91.gark...@gmail.com>
Subject How do I retry processing a message from a certain point back or an entire route but process something before redelivery
Date Sat, 06 Aug 2016 10:45:39 GMT
There is a topic already present " </a> <http://How do I retry processing a
message from a certain point back or an entire route> " but this does not
answer my question fully.

How can I process something before redelivery on the same. I want to process
something on exception in second route but then retry the entire route. Is
this possible?

My Code: Sample Format
 
from("direct:start")
    .to("mock:a")
    .loop(3 times)
    .to("direct:sub")
    .to("mock:c");
 
onException(Exception.class) // unauthorised exception in second route
handles here 
    .maximumRedeliveries(2).onREDelivery(new MyProcessor()); 

from("direct:sub")  
    .to("mock:b"); //exception occured here

It is retrying from the first route but not doing anything on redelivery.
   



--
View this message in context: http://camel.465427.n5.nabble.com/How-do-I-retry-processing-a-message-from-a-certain-point-back-or-an-entire-route-but-process-somethiy-tp5786100.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message