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

Throttling policy is broken because service suspension/resume is not symmetric

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.19.0
    • camel-core
    • None
    • Unknown

    Description

      Camel ServiceHelper suspends and resumes services in a wrong way:

      When suspending a service, Camel checks if the service is implementing the Suspendable (marker) interface, while that interface is ignored when resuming it.

      If you take a non Suspendable service like the TimerConsumer (it is not Suspendable but it is a SuspendableService, like many others...), the ServiceHelper will call the "stop()" method when suspending it, and the "resume()" method when resuming it. Practically it'll remain stopped ("resume()" is not implemented in > 90% of the components), since "start()" should be called after a stop operation.

      So the ThrottlingInflightRoutePolicy, that suspends a route when there are too many exchanges and resumes it when they get lower than a threshold, is broken for many components (the route is stopped, but it's never restarted correctly).

      Attachments

        Activity

          People

            nferraro Nicola Ferraro
            nferraro Nicola Ferraro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: