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 early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
Camel LifecycleCamel uses a simple lifecycle interface called Service which has a single start() and stop() method. Various classes implement Service such as CamelContext along with a number of Component and Endpoint classes. 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. CamelContext LifecycleThe
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. Service lifecycleA service (
Notice: A service can optimally support suspend/resume by the The Routes lifecycleRoutes in Camel have the following operations to control its lifecycle
The The 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. See Also |