camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rene Avontuur (JIRA)" <>
Subject [jira] [Commented] (CAMEL-5599) Throttler EIP - Add support for throttling based on grouping
Date Thu, 03 Apr 2014 09:53:16 GMT


Rene Avontuur commented on CAMEL-5599:

I wonder if introducing a pluggable strategy would be helpful here.
This would give end users the option to use another predefined throttle strategy or even the
option to write an own implementation.
A default strategy ensures backwards compatibility with respect to current behaviour of the

The idea is to extend the ThrottlerDefinition class with: 
private ThrottlerStrategy throttlerStrategy;

The ThrottlerStrategy interface will look like:
public interface ThrottlerStrategy {
    long calculateDelay(Exchange exchange) throws CamelExchangeException;
    void setMaximumRequestsPerPeriod(long maximumRequestsPerPeriod);
    void setTimePeriodMillis(AtomicLong timePeriodMillis);

I am not sure if extending the API with an optional strategy is regarded as backwards compatible.

> Throttler EIP - Add support for throttling based on grouping
> ------------------------------------------------------------
>                 Key: CAMEL-5599
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, eip
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
> See
> It would be nice if we could add an expression to the throttler. So it would use that
as grouping (eg alike correlation expression in the aggregator). Then you can use that to
throttle messages differently.
> The tricky part is to keep API backwards compatible and add the same time add optional
expression in the DSL.

This message was sent by Atlassian JIRA

View raw message