Using thread pool profiles
In the Using custom thread pools recipe we saw how thread pools could be defined. These can be re-used across multiple EIPs and routes.
This recipe will take that idea to the next level by guiding you through defining thread pool profiles, which act as templates for thread pool creation. By referring to a thread pool profile, an EIP will have a thread pool created for its own exclusive use with the characteristics defined in the profile.
Getting ready
The Java code for this recipe is located in the org.camelcookbook.parallelprocessing.threadpoolprofiles
package. The Spring XML files are located under src/main/resources/META-INF/spring
and prefixed with threadPoolProfiles
.
How to do it...
Configure a threadPoolProfile
class ...
Get Apache Camel Developer's Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.