Also, when Messages distributed across multiple message flows needs to be aggregated you obviously need an <aggregator>
For example:
Code:
<int:publish-subscribe-channel id="myPubSubChannel" apply-sequence="true"/>
<int:service-activator id="serviceA" input-channel="myPubSubChannel" output-channel="aggregatingChannel"/>
<int:service-activator id="serviceB" input-channel="myPubSubChannel" output-channel="aggregatingChannel"/>
<int:service-activator id="serviceC" input-channel="myPubSubChannel" output-channel="aggregatingChannel"/>
<int:aggregator input-channel="aggregatingChannel"/>
In the above the 'aggregatingChannel' will be automatically created as a DirectChannel (you can always define it explicitly if you want)
The aggregato configuration is really that simple (as you see above) for this default scenario since by adding apply-sequence="true" on the publish-subscribe-channel we ensured that all the Message Headers required by the aggregator to perform default aggregation are there.