FAQ
I am fairly new to Camel & have a specific requirement around throttling.
Here is the scenario:

A servlet endpoind is serving requests from 1000 clients. A custom setting
for each client is maintained around maximum concurrent requests that can be
processed and the maximum number of messages that can be queued. Client id
is a part of payload.

i.e. ClientA - Maximum 5 requests would be processed concurrently for
ClientA. If the concurrent limit is reached, next 10 requests would be
queued from that client. If both the limits are reached, requests will be
rejected with specific error message.
These limits are different for ClientB.

Any help would be highly appreciated :)

Things I tried so far:
1. Created a custom RoutePolicy & maintained a ConcurrentHashMap to track
requests from clients. Inside onExchangeBegin, if max limit is reached
exception is being thrown. Couldn't manage to put these messages in queue.




--
View this message in context: http://camel.465427.n5.nabble.com/Request-throttling-queue-limit-based-on-client-id-tp5763831.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedMar 9, '15 at 10:38a
activeMar 9, '15 at 10:38a
posts1
users1
websitecamel.apache.org

1 user in discussion

Ganeshraut: 1 post

People

Translate

site design / logo © 2021 Grokbase