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 Details

    • CamelRouteControllerDefinition

      public CamelRouteControllerDefinition()
  • Method Details

    • getSupervising

      public String getSupervising()
    • setSupervising

      public 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. 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

      public String getIncludeRoutes()
    • setIncludeRoutes

      public void setIncludeRoutes(String includeRoutes)
      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

      public String getExcludeRoutes()
    • setExcludeRoutes

      public void setExcludeRoutes(String excludeRoutes)
      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

      public String getThreadPoolSize()
    • setThreadPoolSize

      public void setThreadPoolSize(String threadPoolSize)
      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

      public String getInitialDelay()
    • setInitialDelay

      public void setInitialDelay(String initialDelay)
      Initial delay in milli seconds before the route controller starts, after CamelContext has been started.
    • getBackOffDelay

      public String getBackOffDelay()
    • setBackOffDelay

      public void setBackOffDelay(String backOffDelay)
      Backoff delay in millis when restarting a route that failed to startup.
    • getBackOffMaxDelay

      public String getBackOffMaxDelay()
    • setBackOffMaxDelay

      public void setBackOffMaxDelay(String backOffMaxDelay)
      Backoff maximum delay in millis when restarting a route that failed to startup.
    • getBackOffMaxElapsedTime

      public String getBackOffMaxElapsedTime()
    • setBackOffMaxElapsedTime

      public 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.
    • getBackOffMaxAttempts

      public String getBackOffMaxAttempts()
    • setBackOffMaxAttempts

      public void setBackOffMaxAttempts(String backOffMaxAttempts)
      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

      public String getBackOffMultiplier()
    • setBackOffMultiplier

      public void setBackOffMultiplier(String backOffMultiplier)
      Backoff multiplier to use for exponential backoff. This is used to extend the delay between restart attempts.
    • getUnhealthyOnExhausted

      public String getUnhealthyOnExhausted()
    • setUnhealthyOnExhausted

      public 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. Setting this to true allows health checks to know about this and can report the Camel application as DOWN.
    • getLoggingLevel

      public String getLoggingLevel()
    • setLoggingLevel

      public void setLoggingLevel(String loggingLevel)
      Sets the logging level used for logging route activity (such as starting and stopping routes). The default logging level is DEBUG.