Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17726

route controller: allow to mark a route as failed

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.16.0
    • None
    • Unknown

    Description

      The camel-controlbus allow to control routes i.e. you can stop it.

      In some circumstances it may be useful to stop a route as pat of the error handling strategy and let the health check report the application as not ready.

      As example, one may think to do something like:

      from("timer:tick")
              .routeId("main")
              .process(e -> { throw new RuntimeCamelException("error happended")); })
              .errorHandler(deadLetterChannel("controlbus:route?routeId=current&action=stop"))
              .to("log:info?showAll=true");
      

      This would result in the route being stopped but the health check won't report the application as not ready because:

      • the RouteHealthCheck code would report the route as UNKNOWN
      • the RouteError is cleared up when the route is stopped.

      It may be useful to enrich the control-bus with some additional failure attributes, something like:

      controlbus:route?routeId=current&action=stop&fail=true&propagateException=true"
      

      Where:

      • fail=true tells the control bus that the route should be stopped but also marked as failed
      • propagateException=true tells the control bus that if the exchange is failed, the exception need to be propagated to the route and preserved (not cleaned up on stop)

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              lb Luca Burgazzoli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: