camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Suggestions on setting different Throttler values per Client
Date Thu, 04 Jun 2009 13:16:08 GMT

On Thu, Jun 4, 2009 at 2:11 PM, angeloNZ <> wrote:
> Hi,
> I'm using Camel alongside ServiceMix.  I want to get advise on how to
> properly use the Throttler for a particular scenario.  I have a use case
> where clients sending requests to ServiceMix will have different Quality of
> Service values based on their gven credentials.  Once the request is
> received, an LDAP server will be queried for the client's appropriate QoS
> value.  This value is then intended to be used as the throttler value in the
> DSL definition:
> from("jbi:service:...").throttle(<retrieved QoS value>).to("...");
> Question 1:  does this approach ensure that the different clients would be
> throttled differently for the same endpoint?
No there is only 1 throttler so it will throttle the same for all
messages going through it.

You can use a Content Based Router to route to different routes where each route
suits a particular QoS.

The throttler is however a bit to static as it is configured once in
the route and then uses
the same values at runtime.

I will add a ticket to improve it so you can
- define the throttle values using an expression

What the throttler is missing is some sort of group knowledge. If we
added some correlation expression
then you could use that to distringiush your clients.

And with this correlation id Camel can use it as a key to obtain the
QoS for the throtteling.
This allows it to be dynamic at runtime and use different QoS for
different messages.

And all in the same route.

> Question 2:  In this scenario the LDAP server is queried for the throttle
> value every request and then set to the DSL each time.  I feel like this
> isn't quite a good approach to throttling.  Wouldn't doing this somehow
> reset the throttler each time per request?  What would be a good approach to
> avoid resetting the throttle value each time and make successive requests
> from the same client count towards the first throttle value set?
Yeah see above.

> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Apache Camel Committer

Open Source Integration:

View raw message