Hi
I have a set of routes that looks like this:
--------------------------------------------
<route id="getcustomer">
<from
uri="restlet:http://{{fpRestHost}}:{{fpRestPort}}/greenfield/customer/getcustomer/{customerId}?restletMethod=GET"
/>
<to
uri="bean:customCustomerService?method=getCustomer"/>
</route>
--------------------------------------------
In my bean "customCustomerService" I call a backend service that needs to be
protected as it falls over under load.
The requirement is that excess incoming requests need to be discarded
(returned an appropriate a HTTP status code eg 503 unavailable
immediately).
So for example if only 10 requests can be processed concurrently, any (HTTP)
requests that come in while those ten slots are being processed need return
to immediately to the caller.
I've looked at the Throttler EIP and the ThrottlingInflightRoutePolicy
routepolicy but these seem to just block/wait or queue excess requests to be
serviced when the protected resource is ready again.
Is there an alternative throttling technique which allows me to discard
requests as described above?
--
View this message in context:
http://camel.465427.n5.nabble.com/throttling-a-restlet-endpoint-by-discarding-excess-requests-tp5738089.html
Sent from the Camel - Users mailing list archive at Nabble.com.