Processing split messages in parallel

When building integrations, it is often necessary to increase the throughput of a route. Short of speeding up the individual steps, which may not always be possible, one of the most convenient ways to do this is to process portions of the route in parallel. This recipe will show how you can use the Splitter EIP's parallel processing option to hand off message fragments to a pool of threads for concurrent processing.

Getting ready

Java code for this recipe is located in the org.camelcookbook.splitjoin.split package. Spring XML files are located under src/main/resources/META-INF/spring and prefixed with splitParallel and splitExecutorService.

How to do it...

To process split messages through the route in parallel, ...

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.