Splitting a message into fragments

The Splitter EIP provides you with a versatile mechanism for breaking a message down into smaller fragments and processing them individually.

Splitting a message into fragments

This recipe will show you how to use the Splitter EIP, along with Camel's built-in Expression Languages, to easily slice up your messages.

Getting ready

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

How to do it...

Inside your route, create a split statement, whose first line is the split expression. The following code splits a message ...

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.