December 2013
Intermediate to advanced
424 pages
9h 7m
English
Usually when dealing with an EIP such as Splitter, Multicast, or Aggregator, the default pool of 10 threads that is created for the EIP is sufficient. However, each of these patterns allow you to provide a customized pool if this default pool is inadequate for your needs.
This recipe will outline how to define a custom thread pool in Camel.
The Java code for this recipe is located in the org.camelcookbook.parallelprocessing.threadpools package. The Spring XML files are located under src/main/resources/META-INF/spring and prefixed with threadPools.
To define a custom thread pool using the XML DSL, add a threadPool definition before any routes in the camelContext element:
<camelContext xmlns="http://camel.apache.org/schema/spring"> ...
Read now
Unlock full access