public interface SupervisingRouteController extends RouteController
RouteController
that delays the startup of the routes after the camel context startup
and takes control of starting the routes in a safe manner. This controller is able to retry starting failing routes,
and have various options to configure settings for backoff between restarting routes.Modifier and Type | Method and Description |
---|---|
long |
getBackOffDelay() |
long |
getBackOffMaxAttempts() |
long |
getBackOffMaxDelay() |
long |
getBackOffMaxElapsedTime() |
double |
getBackOffMultiplier() |
String |
getExcludeRoutes() |
Collection<Route> |
getExhaustedRoutes()
Return the list of routes that have failed all attempts to startup and are now exhausted.
|
String |
getIncludeRoutes() |
long |
getInitialDelay() |
Throwable |
getRestartException(String routeId)
Gets the last exception that caused the route to not startup for the given route
|
Collection<Route> |
getRestartingRoutes()
Return the list of routes that are currently under restarting by this controller.
|
org.apache.camel.util.backoff.BackOffTimer.Task |
getRestartingRouteState(String routeId)
Gets the state of the backoff for the given route if its managed and under restarting.
|
int |
getThreadPoolSize() |
boolean |
isUnhealthyOnExhausted()
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.
|
void |
setBackOffDelay(long backOffDelay)
Backoff delay in millis when restarting a route that failed to startup.
|
void |
setBackOffMaxAttempts(long backOffMaxAttempts)
Backoff maximum number of attempts to restart a route that failed to startup.
|
void |
setBackOffMaxDelay(long backOffMaxDelay)
Backoff maximum delay in millis when restarting a route that failed to startup.
|
void |
setBackOffMaxElapsedTime(long backOffMaxElapsedTime)
Backoff maximum elapsed time in millis, after which the backoff should be considered exhausted and no more
attempts should be made.
|
void |
setBackOffMultiplier(double 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(long initialDelay)
Initial delay in milli seconds before the route controller starts, after CamelContext has been started.
|
void |
setThreadPoolSize(int threadPoolSize)
The number of threads used by the scheduled thread pool that are used for restarting routes.
|
void |
setUnhealthyOnExhausted(boolean 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.
|
adapt, getControlledRoutes, getRouteStartupLoggingLevel, getRouteStatus, isStartingRoutes, resumeRoute, setRouteStartupLoggingLevel, startAllRoutes, startRoute, stopRoute, stopRoute, stopRoute, supervising, suspendRoute, suspendRoute
getCamelContext, setCamelContext, trySetCamelContext
String getIncludeRoutes()
void setIncludeRoutes(String includeRoutes)
String getExcludeRoutes()
void setExcludeRoutes(String excludeRoutes)
int getThreadPoolSize()
void setThreadPoolSize(int threadPoolSize)
long getInitialDelay()
void setInitialDelay(long initialDelay)
long getBackOffDelay()
void setBackOffDelay(long backOffDelay)
long getBackOffMaxDelay()
void setBackOffMaxDelay(long backOffMaxDelay)
long getBackOffMaxElapsedTime()
void setBackOffMaxElapsedTime(long backOffMaxElapsedTime)
long getBackOffMaxAttempts()
void setBackOffMaxAttempts(long backOffMaxAttempts)
double getBackOffMultiplier()
void setBackOffMultiplier(double backOffMultiplier)
void setUnhealthyOnExhausted(boolean unhealthyOnExhausted)
boolean isUnhealthyOnExhausted()
Collection<Route> getRestartingRoutes()
Collection<Route> getExhaustedRoutes()
org.apache.camel.util.backoff.BackOffTimer.Task getRestartingRouteState(String routeId)
routeId
- the route idApache Camel