The splitter

The aggregator will aggregate the message and put it on the aggregatedFeedChannel. Let's have a splitter wired on this channel, which can split back the list of messages and pass one at a time for further processing on to the splittedFeedChannel channel. The Spring configuration is given in the following code snippet:

<int:splitter ref="splitterSoFeedBean" method="splitAndPublish" input-channel="aggregatedFeedChannel" output-channel="splittedFeedChannel" />

The JavaBean with the splitter logic:

import java.util.List; import com.sun.syndication.feed.synd.SyndEntry; public class SoFeedSplitter { public List<SyndEntry> splitAndPublish(List<SyndEntry> message) { //Return one message from list at a time -this will be picked up //by the processor ...

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.