I'll open a JIRA. This seems like a nice feature on the Throttler EIP to
throttle for certain groups.

However, couldn't you just route to the throttler?

from(input).choice().when(clientIdMatch).to("seda:throttle").otherwise().to("direct:service")

from("seda:throttle").throttle().to("direct:service")


On Tue, Oct 8, 2013 at 6:57 AM, James Carman <ja...@carmanconsulting.com>wrote:

> The idea would be basically what Claus said.  You'd have an expression
> you use in order to "correlate" messages with one another.  This
> expression would be evaluated against incoming messages and the result
> would be used to lookup the throttling state for that group in some
> map (probably a ConcurrentHashMap wrapped by LRU to prevent memory
> leaks or something).
>
> On Mon, Oct 7, 2013 at 3:51 PM, Daniel Bularzik <d...@akc.org> wrote:
> > So obviously, instead of asking "Is there a way..." I should have asked
> "How do I..."
> >
> > Consider this a restatement of my original question. How would I go
> about doing this? A summary of a whiteboard implementation would be
> sufficient.
> >
> >
> > -----Original Message-----
> > From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com]
> On Behalf Of James Carman
> > Sent: Monday, October 07, 2013 8:08 AM
> > To: users@camel.apache.org
> > Subject: Re: Throttling by client ID?
> >
> > I actually had to implement that on a whiteboard when interviewing for a
> certain tech company.  It's not terribly difficult to implement such a
> beast.
> >
> >
> > On Mon, Oct 7, 2013 at 7:59 AM, Daniel Bularzik <d...@akc.org> wrote:
> >
> >>  We're looking to enforce a per-client SLA; notably, right now we're
> >> considering how to throttle service use on a per-client basis. I've
> >> found the Throttler Pattern, but this appears to only useful for
> >> throttling overall use of the service. Is there a way to use Throttler
> >> to limit access on a per-client basis? Assume the client ID is
> >> available in the exchange.*
> >> ***
> >>
> >> ** **
> >>
> >> Daniel Bularzik, Lead Software Engineer****
> >>
> >> ****8051 Arco Corporate Drive, Suite 100, Raleigh, NC 27617****
> >>
> >> 919-816-3818, d...@akc.org****
> >>
> >> www.akc.org   Facebook <https://www.facebook.com/AmericanKennelClub>
> >> Twitter <https://twitter.com/akcdoglovers>****
> >>
> >> ** **
> >>
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Reply via email to