Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Complete
-
1.0 M4
Description
Scatter-Gather is quite a common and useful pattern. You can implement it in Spring Integration but it's long-winded and wasteful of channel schedules, e.g.
<integration:handler-endpoint input-channel="requests" handler="splitter"/>
<integration:handler-endpoint input-channel="splits" handler="router" />
<integration:handler-endpoint input-channel="scatters" handler="aggregator" />
<integration:router id="router" ref="scatterer" method="route" />
<integration:splitter id="splitter" ref="scatterer" method="split" output-channel="splits" />
<integration:aggregator id="aggregator" ref="scatterer" default-reply-channel="replies" method="aggregate" />
This example uses a single POJO (called "scatterer") to synthesise a scatter and gather. It first splits the incoming message on "requests" and then routes the resulting messages to a pre-specified set of channels (names injected into the POJO). Then it also acts as an aggregator, waiting for the requests to come back in to the "scatters" channel.
Attachments
Issue Links
- is depended on by
-
INT-3538 Document Scatter-Gather, Routing Slip and Idempotent Receiver Support
-
- Closed
-