camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicola Ferraro (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-10707) Throttling policy is broken because service suspension/resume is not symmetric
Date Tue, 17 Jan 2017 10:54:26 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-10707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nicola Ferraro updated CAMEL-10707:
-----------------------------------
    Component/s: camel-core

> 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
>          Components: camel-core
>            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)

Mime
View raw message