Package org.apache.camel.core.xml
Class CamelRouteControllerDefinition
java.lang.Object
org.apache.camel.model.IdentifiedType
org.apache.camel.core.xml.CamelRouteControllerDefinition
@Metadata(label="spring,configuration")
public class CamelRouteControllerDefinition
extends org.apache.camel.model.IdentifiedType
Route controller configuration.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setBackOffDelay
(String backOffDelay) Backoff delay in millis when restarting a route that failed to startup.void
setBackOffMaxAttempts
(String backOffMaxAttempts) Backoff maximum number of attempts to restart a route that failed to startup.void
setBackOffMaxDelay
(String backOffMaxDelay) Backoff maximum delay in millis when restarting a route that failed to startup.void
setBackOffMaxElapsedTime
(String backOffMaxElapsedTime) Backoff maximum elapsed time in millis, after which the backoff should be considered exhausted and no more attempts should be made.void
setBackOffMultiplier
(String backOffMultiplier) Backoff multiplier to use for exponential backoff.void
setExcludeRoutes
(String excludeRoutes) Pattern for filtering routes to be excluded as supervised.void
setIncludeRoutes
(String includeRoutes) Pattern for filtering routes to be included as supervised.void
setInitialDelay
(String initialDelay) Initial delay in milli seconds before the route controller starts, after CamelContext has been started.void
setLoggingLevel
(String loggingLevel) Sets the logging level used for logging route activity (such as starting and stopping routes).void
setSupervising
(String supervising) To enable using supervising route controller which allows Camel to startup and then the controller takes care of starting the routes in a safe manner.void
setThreadPoolSize
(String threadPoolSize) The number of threads used by the scheduled thread pool that are used for restarting routes.void
setUnhealthyOnExhausted
(String unhealthyOnExhausted) Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up.Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
CamelRouteControllerDefinition
public CamelRouteControllerDefinition()
-
-
Method Details
-
getSupervising
-
setSupervising
To enable using supervising route controller which allows Camel to startup and then the controller takes care of starting the routes in a safe manner. This can be used when you want to startup Camel despite a route may otherwise fail fast during startup and cause Camel to fail to startup as well. By delegating the route startup to the supervising route controller then its manages the startup using a background thread. The controller allows to be configured with various settings to attempt to restart failing routes. -
getIncludeRoutes
-
setIncludeRoutes
Pattern for filtering routes to be included as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to include all kafka routes, you can say kafka:*. And to include routes with specific route ids myRoute,myOtherRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. -
getExcludeRoutes
-
setExcludeRoutes
Pattern for filtering routes to be excluded as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to exclude all JMS routes, you can say jms:*. And to exclude routes with specific route ids mySpecialRoute,myOtherSpecialRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. -
getThreadPoolSize
-
setThreadPoolSize
The number of threads used by the scheduled thread pool that are used for restarting routes. The pool uses 1 thread by default, but you can increase this to allow the controller to concurrently attempt to restart multiple routes in case more than one route has problems starting. -
getInitialDelay
-
setInitialDelay
Initial delay in milli seconds before the route controller starts, after CamelContext has been started. -
getBackOffDelay
-
setBackOffDelay
Backoff delay in millis when restarting a route that failed to startup. -
getBackOffMaxDelay
-
setBackOffMaxDelay
Backoff maximum delay in millis when restarting a route that failed to startup. -
getBackOffMaxElapsedTime
-
setBackOffMaxElapsedTime
Backoff maximum elapsed time in millis, after which the backoff should be considered exhausted and no more attempts should be made. -
getBackOffMaxAttempts
-
setBackOffMaxAttempts
Backoff maximum number of attempts to restart a route that failed to startup. When this threshold has been exceeded then the controller will give up attempting to restart the route, and the route will remain as stopped. -
getBackOffMultiplier
-
setBackOffMultiplier
Backoff multiplier to use for exponential backoff. This is used to extend the delay between restart attempts. -
getUnhealthyOnExhausted
-
setUnhealthyOnExhausted
Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up. Setting this to true allows health checks to know about this and can report the Camel application as DOWN. -
getLoggingLevel
-
setLoggingLevel
Sets the logging level used for logging route activity (such as starting and stopping routes). The default logging level is DEBUG.
-