Quantcast

Persistent Camel Context

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Persistent Camel Context

Max Ullinger
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?

Max
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Persistent Camel Context

Claus Ibsen-2
On Fri, Jul 9, 2010 at 3:34 PM, Max Ullinger <[hidden email]> wrote:

> 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.




> Max
>



--
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AW: Persistent Camel Context

Max Ullinger
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.

Thanks for the answer
Max

-----Urspr√ľngliche Nachricht-----
Von: Claus Ibsen [mailto:[hidden email]]
Gesendet: Freitag, 9. Juli 2010 15:55
An: [hidden email]
Betreff: Re: Persistent Camel Context
[Snip]

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.

> Max
>



--
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Persistent Camel Context

vipup
In reply to this post by Claus Ibsen-2
 
Claus Ibsen-2 wrote
 
...
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:
 
org.apache.camel.view.XmlGraphGenerator.class wrote
 
        // TODO we should add a transactional client / event driven consumer / polling client
 
Which way to (de)serialize you can recommend?

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?

Short code-snippet will be gr8!
Loading...