Throttle Processor
In some situations, we may need to limit the number of messages, thus the Throttle processor ensures that a producer endpoint does not get overloaded. It works by limiting the number of messages that can pass through per second. If the incoming message count exceeds the specified rate, then the throttler accumulates excess messages in a buffer and transmits them more slowly to the producer endpoint.
XML DSL:
<camelContext id="throttleRoute" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="SourceURL"/>
<throttle maximumRequestsPerPeriod="100" timePeriodMillis="1000">
<to uri="TargetURL"/>
</throttle>
</route>
</camelContext>
Â
Java DSL:
from("SourceURL").throttle(100).to("TargetURL");