Quantcast

Re-intilaizing Camel route?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re-intilaizing Camel route?

Prasad k
Hi,

I need  camel route, which is being initialized using configurations stored in database, to re-initialize on every change in database configuration at run time(without Re-starting server)?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re-intilaizing Camel route?

Claus Ibsen-2
There is no such functionality out of the box. You can write some code
yourself that check for changes in the database, and then update the
routes. There is API on CamelContext to stop/remove/add routes.

You can also look at the new auto reload of xml routes
http://www.davsclaus.com/2016/12/camel-live-reload-of-xml-routes.html

That has some starting point you can use, and then you need to add the
code that checks the database instead of files, and load the routes
from the database.

Assuming your routes are in xml.


On Wed, May 17, 2017 at 8:04 AM, Prasad k <[hidden email]> wrote:

> Hi,
>
> I need  camel route, which is being initialized using configurations stored
> in database, to re-initialize on every change in database configuration at
> run time(without Re-starting server)?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Re-intilaizing-Camel-route-tp5799670.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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re-intilaizing Camel route?

Johannes F. Knauf
In reply to this post by Prasad k
On 17.05.2017 08:04, Prasad k wrote:
>
> I need  camel route, which is being initialized using configurations stored
> in database, to re-initialize on every change in database configuration at
> run time(without Re-starting server)?

You might also want to have a look at using Camel routes packaged as OSGi bundles, at deployment in
a Karaf runtime and at using Blueprint Property Placeholders + the reload update-strategy.

Of course, this does not synchronise from a database, but from files. But this missing part can be
easily delivered by an additional piece of code.
Loading...