camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Throttling based on content in camel
Date Sat, 13 Dec 2014 14:47:39 GMT
+1 to create a new ThrottlingContentBasedRoutePolicy, and we can do some refactoring to let ThrottlingContentBasedRoutePolicy
and ThrottlingInflightRoutePolicy share some common logic in a super class.

Willem Jiang

Red Hat, Inc.
Blog: (English) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem

On December 11, 2014 at 11:40:19 PM, yogu13 ( wrote:
> Hello Williem,
> We would like a lock to be implemented instead of any async delay as the
> requirement is to allow X number of processing threads to be allowed for a
> particular customer at any given point in time. If the number of requests
> exceed X then the spilled ones needs to be blocked till any one of the
> ongoing threads/flows ends the processing. Also the blocked threads would be
> blocked for a finite time exceeding which they would be returned back.
> On quick inspection of the current
> org.apache.camel.impl.ThrottlingInflightRoutePolicy i see that instead of
> boolean stop = maxInflightExchanges > 0 && size > maxInflightExchanges;
> within throttle method if we can externalize the condition for user defined
> implementation to return the value then it could do..
> Also to maintain backward compatibility it would be better if a second
> implementation of org.apache.camel.impl.ContentBasedRoutePolicy is made
> available.
> However this is just the initial thought ...
> Let me know if you see any issues with this to begin with and would this be
> desired ?
> Regards,
> -Yogesh
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

View raw message