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 return message; } }