This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new b644aa0 CAMEL-15036: Make it easier to switch to use supervising route controller in XML DSL b644aa0 is described below commit b644aa0de2f494656f52209f63ca5923d665c70c Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon May 11 14:10:52 2020 +0200 CAMEL-15036: Make it easier to switch to use supervising route controller in XML DSL --- .../modules/ROOT/pages/graceful-shutdown.adoc | 6 ++++++ .../modules/ROOT/pages/route-controller.adoc | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/docs/user-manual/modules/ROOT/pages/graceful-shutdown.adoc b/docs/user-manual/modules/ROOT/pages/graceful-shutdown.adoc index 37e6f87..72a4a2e 100644 --- a/docs/user-manual/modules/ROOT/pages/graceful-shutdown.adoc +++ b/docs/user-manual/modules/ROOT/pages/graceful-shutdown.adoc @@ -415,3 +415,9 @@ xref:batch-consumer.adoc[Batch Consumer] should implement `ShutdownAware` so they properly support the `ShutdownRunningTask` option. See `GenericFileConsumer` for an example. + +== See Also + +When Camel is starting up, then its xref:route-controller.adoc[Route Controller] +that handles this to ensure all the routes are started with support for managing +troublesome routes with restaring. diff --git a/docs/user-manual/modules/ROOT/pages/route-controller.adoc b/docs/user-manual/modules/ROOT/pages/route-controller.adoc index 34c0c92..c04fe98 100644 --- a/docs/user-manual/modules/ROOT/pages/route-controller.adoc +++ b/docs/user-manual/modules/ROOT/pages/route-controller.adoc @@ -71,6 +71,8 @@ from("salesforce:cheese") Then we can tell Camel to use the supervising route controller to let Camel attempt to recover starting the salesforce route. +Enabling and configuring supervising route controller from Java: + [source,java] ----- CamelContext camel = ... @@ -108,6 +110,25 @@ camel.springboot.routeControllerInitialDelay = 1000 camel.springboot.routeControllerThreadPoolSize = 2 ---- +And for users with XML DSL in Spring or OSGi Blueprint, you can do as follows: + +[source,xml] +---- +<camelContext> + <routeController id="myController" + supervising="true" initialDelay="1000" threadPoolSize="2" + backOffDelay="5000" backOffMaxAttempts="3"/> + <route> + <from uri="file:foo/cake"/> + <to uri="log:cake"/> + </route> + <route> + <from uri="salesforce:cheese"/> + <to uri="log:cheese"/> + </route> +</camelContext> +---- + === Supervising Options You can configure the `SupervisingRouteController` using the following options: