camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mnl <mnlgoya...@gmail.com>
Subject Switch to route in case original route fails
Date Wed, 10 Feb 2016 04:27:45 GMT
I have 2 routes of which one acts as the main route and other one is required
in case original fails. Now, there are 2 kinds of requirements:
1. If original (say route1) fails, I switch to other route (say route2) and
start sending exchange using route2. But in background I check if route1 can
be active again. If this happens I want to use route1 again instead of
route2. So in this way route2 is required only at times route1 is not
functional.

2. If route1 fails, we start using route2. But in times when route2 fails, I
want to check route1 and start using it again. So here we alternate between
route1 and route2 depending which is available and working.

I read through the camel documentation and I came across OnCompletion
concept (http://camel.apache.org/oncompletion.html) which can help me switch
to different route in case original fails. But I am not able to accomplish
either of above tasks successfully with this.
I want to switch to original route again or alternate between them depending
on their availability. Does camel already provide this functionality? If
yes, please refer me some documentation, else please direct me the steps
which I can follow?

Any help in this matter is appreciated. Thanks :)




--
View this message in context: http://camel.465427.n5.nabble.com/Switch-to-route-in-case-original-route-fails-tp5777511.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message