[
https://issues.apache.org/jira/browse/CAMEL-10707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nicola Ferraro resolved CAMEL-10707.
------------------------------------
Resolution: Fixed
Fix Version/s: 2.19.0
> Throttling policy is broken because service suspension/resume is not symmetric
> ------------------------------------------------------------------------------
>
> Key: CAMEL-10707
> URL: https://issues.apache.org/jira/browse/CAMEL-10707
> Project: Camel
> Issue Type: Bug
> Reporter: Nicola Ferraro
> Assignee: Nicola Ferraro
> Fix For: 2.19.0
>
>
> Camel ServiceHelper suspends and resumes services in a wrong way:
> - Resume:
> https://github.com/apache/camel/blob/camel-2.18.1/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java#L313
> - Suspend:
> https://github.com/apache/camel/blob/camel-2.18.1/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java#L384
> 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).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)