camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <>
Subject Re: throttling a restlet endpoint by discarding excess requests
Date Wed, 28 Aug 2013 04:18:18 GMT
Well, another thing you could look into is using a custom
ScheduledThreadPoolExecutor for the throttler. You could use a
BlockingQueue with a specific size (10 in your case), and any others that
tried to get scheduled would through an exception. Then in the throttler
config you would set 'callerRunsWhenRejected' == false so that an exception
is thrown.

Take a look here for setting your own custom queue for the

And take a look here for setting custom executor service for the throttler:


On Tue, Aug 27, 2013 at 8:53 PM, osupit <> wrote:

> Very much appreciate the quick response and insights.
> Unfortunately the requirement is as originally stated - I need to discard
> excess load by returning excess requests to the caller - so the Throttler
> option doesn't work for me.
> I'll have a poke around the Restlet docs/community and see if this has been
> come up before.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

*Christian Posta*
twitter: @christianposta

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message