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: http://camel.465427.n5.nabble.com/Throttling-based-on-content-in-camel-tp5760505p5760581.html Sent from the Camel - Users mailing list archive at Nabble.com.