Splitters

Splitters, as the name suggests, are used to split messages in smaller chunks and then send such resulting chunks for independent processing. There can be several reasons for splitting—larger size of payload than that of what is acceptable by the next endpoint, or message load parts that can be processed in parallel or down the chain. There is an aggregator and it is necessary to do some processing before these can be aggregated. Spring Integration provides a splitter tag. As in the case of a filter, splitters can also be written either by extending the framework interface or by writing a custom POJO.

Let's take the simpler one first, leveraging a simple Java class as a splitter:

<int:splitter ref="splitterSoFeedBean" method="splitAndPublish" ...

Get Spring Integration Essentials 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.