You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Serge Smertin <se...@gmail.com> on 2015/07/09 15:49:31 UTC
Throttling and custom exception handling
Greetings!
Given:
ServiceA that is used by multiple applications and has rate limits on
certain endpoints.
In cases when global rate limiting exceeded, ServiceA throws exception with
X seconds delay.
Throttled Camel route with concurrent consumers that submits a request to
that certain endpoint
Initial thoughts:
Every time we get SleepWithDelayException, stop the route by having
separate route with custom processor that stops, sleeps and starts the
route. Though, it may result in a deadlock. It may look like control bus.
Secondary thoughts:
use delay from exception to recalculate next slot in Throttler, though it's
not possible in 2.14 version
So the question is:
Am i moving the correct direction? Any other ideas?
- Serge