Persistent Camel Context

Persistent Camel Context

Hi everybody.

I was wondering if anybody has had experience with persistance for Camel Context ?

We use a (relatively) empty Camel Context (Camel-WEB) and the user dynamically configures/deploys routes at runtime.
Of course when Camel shuts down, all configurations will be lost and the whole system of several distributed Camel instances has to be configured again.

Re: Persistent Camel Context

> Hi everybody.
>
> I was wondering if anybody has had experience with persistance for Camel Context ?
>
> We use a (relatively) empty Camel Context (Camel-WEB) and the user dynamically configures/deploys routes at runtime.
> Of course when Camel shuts down, all configurations will be lost and the whole system of several distributed Camel instances has to be configured again.
>
> The closest I could find in the documentation/forum was this:
> http://camel.465427.n5.nabble.com/Monitoring-and-management-of-Camel-td465646.html#a465646>
> It seems like a lot of the bullet points where implemented, Camel has an excellent JMX access nowadays.
> But I could not find any more information about the persistence.
>
> Any pointers or ideas what to do here?
>

All the routes can be serialized into XML. Which you can then persist.
Then on startup you can load those XML files as routes.
The camel-web have a REST API for that. Or you can use the API on CamelContext.

AW: Persistent Camel Context

Hi.

Yes, I already use the Rest API to deploy the routes to begin with.

On the client side there is a lot more to the project than I mentioned, so I was hoping that Camel can persist routes / changes to the Context by itself.
Unfortunately I don't have as much time to add features to Camel as much I would like to have :)

I am already customizing the Camel-Web war to include JMS components and a custom property resolver, but I was hoping to use Camel out-of-the-box as much as possible.

It seems like (automatic) persistence (of changes to) the Camel Context can not be done currently.
I guess a solution will have to wait for the future.

All the routes can be serialized into XML. Which you can then persist.
Then on startup you can load those XML files as routes.
The camel-web have a REST API for that. Or you can use the API on CamelContext.

Re: Persistent Camel Context

...
All the routes can be serialized into XML. Which you can then persist.
Then on startup you can load those XML files as routes.
The camel-web have a REST API for that. Or you can use the API on CamelContext.
...

Die u mean the XMLGraphGenerator-class? I just checked the sources, where still defined as TODO:

How I'll get back alive Camel-Context after "reconstruction"? For my routings-needs i can imagine the long-term-running context. Is it generally possible without semi-persistence on some JMS-like level?
How Exchange-Object will come into the middle-point of context after restoring?