You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by fxthomas <fe...@gmail.com> on 2016/08/01 09:42:43 UTC
Suspend All routes & Resume incase of Business Exception
hello,
I wish to know which would be the best approach to Suspend and resume all
routes in the context . I saw the route policy approach but it is linked to
each route. I want a Global Context policy in which I can suspend route and
resume also .
For example if there is a DB failure all routes should suspend and my custom
code will listen for the connections being active and resume the routes
again.
--
View this message in context: http://camel.465427.n5.nabble.com/Suspend-All-routes-Resume-incase-of-Business-Exception-tp5785773.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Suspend All routes & Resume incase of Business Exception
Posted by fxthomas <fe...@gmail.com>.
So you are suggesting I stop each route one by one and resume it also similar
fashion .
If multiple share the same process, do you think there could be issue of a
similar (Stop) thread getting called in respective routes ? Since the logic
will be defined in all routes.
--
View this message in context: http://camel.465427.n5.nabble.com/Suspend-All-routes-Resume-incase-of-Business-Exception-tp5785773p5785775.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Suspend All routes & Resume incase of Business Exception
Posted by Marco Westermann <Ma...@gmx.de>.
Hi,
you may have a look here
http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html where
is described how you can start / stop routes from routes.
regards Marco
Am 01.08.2016 um 11:42 schrieb fxthomas:
> hello,
>
> I wish to know which would be the best approach to Suspend and resume all
> routes in the context . I saw the route policy approach but it is linked to
> each route. I want a Global Context policy in which I can suspend route and
> resume also .
>
> For example if there is a DB failure all routes should suspend and my custom
> code will listen for the connections being active and resume the routes
> again.
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Suspend-All-routes-Resume-incase-of-Business-Exception-tp5785773.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Suspend All routes & Resume incase of Business Exception
Posted by fxthomas <fe...@gmail.com>.
Thanks for the Tip
--
View this message in context: http://camel.465427.n5.nabble.com/Suspend-All-routes-Resume-incase-of-Business-Exception-tp5785773p5785818.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Suspend All routes & Resume incase of Business Exception
Posted by Claus Ibsen <cl...@gmail.com>.
You can call suspend/resume on CamelContext that will suspend/resume
all the routes.
On Mon, Aug 1, 2016 at 11:42 AM, fxthomas <fe...@gmail.com> wrote:
> hello,
>
> I wish to know which would be the best approach to Suspend and resume all
> routes in the context . I saw the route policy approach but it is linked to
> each route. I want a Global Context policy in which I can suspend route and
> resume also .
>
> For example if there is a DB failure all routes should suspend and my custom
> code will listen for the connections being active and resume the routes
> again.
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Suspend-All-routes-Resume-incase-of-Business-Exception-tp5785773.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2