Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the asciidoc in the repository: https://github.com/apache/camel/blob/master/README.md https://github.com/apache/camel/blob/master/components/readme.adoc
Camel uses a simple lifecycle interface called Service which has a single start() and stop() method.
When you use Camel you typically have to start the CamelContext which will start all the various components and endpoints and activate the routing rules until the context is stopped again.
If you are working with Spring you may wish to read the Camel Spring documentation.
The operations is paired: start/stop and suspend/resume.
Stop is performing a Graceful shutdown which means all its internal state, cache, etc is cleared. And the routes is being stopped in a graceful manner to ensure messages is given time to complete. If you start a
Instead you can use the suspend/resume operations. They will keep the
End users is encouraged to use suspend/resume if you are temporary stopping a Camel application.
All these operations is available in JMX as well, so you can control Camel from a management console.
A service (
Notice: A service can optimally support suspend/resume by the
Routes in Camel have the following operations to control its lifecycle
If a route is suspended then it keeps its resources and all their JMX metrics alive. Where as stopping a route will graceful stop the route, and clear its resources, and as well their JMX metrics. If you want to temporary "pause" a route, then consider using suspend/resume over stop/start.
If a route consumer does not support suspension, it will fallback and stop the route instead.