Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
from("seda:a").throttlerthrottle(100).to("seda:b");

For further examples of this pattern in use you could look at the junit test case

...

Wiki Markup
{snippet:id=example|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/throttler.xml}

Asynchronous delaying

Available as of Camel 2.4

You can let the Throttler use non blocking asynchronous delaying, which means Camel will use a scheduler to schedule a task to be executed in the future. The task will then continue routing. This allows the caller thread to not block and be able to service other messages etc.

Code Block

from("seda:a").throttle(100).asyncDelayed().to("seda:b");
Include Page
CAMEL:Using This Pattern
CAMEL:Using This Pattern