camel route enable/disable based on configuration

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

camel route enable/disable based on configuration

chaij
Is it possible to enable/disable camel route based on external properties?

For example, if I want to enable/disable a feature. I can create an external property file. At deployment time, by change the property value, I can control the camel route to support the change.

Something like a "if" statement in the camel-context.xml file using Spring DSL.
Reply | Threaded
Open this post in threaded view
|

RE: camel route enable/disable based on configuration

Ravi Godbole
Do you want to start/stop routes when camel app comes up or decide at runtime when to stop the route ?

You can use JMX to stop a specific route when app is up and running.

Regards

Ravi


-----Original Message-----
From: chaij [mailto:[hidden email]]
Sent: Tuesday, March 25, 2014 10:54 AM
To: [hidden email]
Subject: camel route enable/disable based on configuration

Is it possible to enable/disable camel route based on external properties?

For example, if I want to enable/disable a feature. I can create an external property file. At deployment time, by change the property value, I can control the camel route to support the change.

Something like a "if" statement in the camel-context.xml file using Spring DSL.



--
View this message in context: http://camel.465427.n5.nabble.com/camel-route-enable-disable-based-on-configuration-tp5749315.html
Sent from the Camel - Users mailing list archive at Nabble.com.

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful.
-Ravi
Reply | Threaded
Open this post in threaded view
|

RE: camel route enable/disable based on configuration

chaij
it should be decided at startup time.
Hopefuuly not through jmx or programming.
I am hoping that camel supports conditional configuraion.
Reply | Threaded
Open this post in threaded view
|

Re: camel route enable/disable based on configuration

Henrique Viecili-2
Take a look at Control Bus EIP: http://www.eaipatterns.com/ControlBus.html

If you are using Camel 2.11.x, you can use:
https://camel.apache.org/controlbus-component.html

Henrique Viecili


On 25 March 2014 22:32, chaij <[hidden email]> wrote:

> it should be decided at startup time.
> Hopefuuly not through jmx or programming.
> I am hoping that camel supports conditional configuraion.
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-route-enable-disable-based-on-configuration-tp5749315p5749337.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: camel route enable/disable based on configuration

chaij
Thanks!

I also found another solution that may benefit other people.

Use the route autoStartup attribute to control whether or not to start a route. The attribute value can use a property that will be configured at startup time.