tree: 5a6576ecc08f1b0cc362a8b03b3d05a351559911 [path history] [tgz]
  2. pom.xml
  3. src/

Camel Route Throttling


This example shows how to use the new feature in Camel 2.1 which is RoutePolicy. A route policy allows you to associate a route with a policy. Camel provides a throttling policy which allows Camel to dynamic throttle the route consumer depending on the number of concurrent messages current in flight.

The Server is required to be running when you start the client. You can see on the server it should log in the console how it adjust the throttling dynamically.

The goal of this example is to illustrate that Camel throttles the JMS queue to be on same pace with the rest of the Camel routing. When running the example you should observe that the JMS route and the SEDA route completes nearly in sync.


You will need to compile this example first:

mvn compile


The example should run if you type:

mvn exec:java -PCamelServer

mvn exec:java -PCamelClient

mvn exec:java -PCamelFileClient

To stop the example hit ctrl+c


This example is documented at

Forum, Help, etc

If you hit an problems please let us know on the Camel Forums

Please help us make Apache Camel better - we appreciate any feedback you may have. Enjoy!