Reputation: 653
We use Apache Camel as a standalone application for ~ 2 years. It works very well but the need to restart the process to upgrade the application each time we add new routes becomes an issue.
We are searching for a new deployment solution that could allow us to deploy new routes without having to restart the main process.
There is no problem for us to rewrite our Java DSL routes in XML but the issue is that most of them (and probably future ones too) make use of custom beans, processors, components etc. to inject some logic that is too complex to be expressed in pure XML/Java DSL route.
After searching through Camel documentation, hot deploying XML routes seems to be possible with spring-boot or with Karaf/OSGI.
But i have no idea if it is possible to "hot-deploy" bean, processors, components etc. classes that are needed by theses XML routes. OSGI/Karaf looks promising but i have never used boths technologies and it is not easy to grasp their purpose at first glance.
Which deployment method and which technology could allow us to "hot deploy' routes and beans classes ?
Upvotes: 3
Views: 1856
Reputation: 266
You could try to use camel-blueprint to setup the context/route. By exposing your bean as osgi service, you can use those beans in routes. I would suggest you to take a look into apache camel blueprint maven archetype and camel component archetype to get started.
Hot deploy in Apache Karaf is simple, simply drop the bundle into $KARAF_HOME/deploy and it will reload automatically.
Reference: camel-archetype-component camel-archetype-blueprint
Do let me know if this help.
PS: I don't have enough reputation for commenting hence the answer.
Upvotes: 2
Reputation: 55525
If you want to hot-deploy Java code, then you need an application server like platform such as Apache Karaf/ServiceMix/JBoss Fuse etc or a traditional like Tomcat, JBoss, WildFly etc (for WAR files).
Then you can do a "hot deployment" as a deployment of the application.
To hot-deploy a single class or some classes inside a running JVM is harder, and you would need special tooling such as JRebel.
Upvotes: 2