INT-3540: Add <scatter-gather> to the <chain>
JIRA: https://jira.spring.io/browse/INT-3540
This commit is contained in:
@@ -1731,6 +1731,7 @@
|
||||
<xsd:element name="claim-check-in" type="claimCheckInTypeChain"/>
|
||||
<xsd:element name="claim-check-out" type="claimCheckOutTypeChain"/>
|
||||
<xsd:element name="control-bus" type="control-bus-type"/>
|
||||
<xsd:element name="scatter-gather" type="scatter-gather-type"/>
|
||||
<xsd:element name="chain">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
|
||||
@@ -58,4 +58,9 @@
|
||||
<gatherer release-strategy-expression="^[payload gt 5] != null or size() == 3"/>
|
||||
</scatter-gather>
|
||||
|
||||
<chain input-channel="scatterGatherWithinChain" output-channel="output">
|
||||
<scatter-gather scatter-channel="auctionChannel"/>
|
||||
<splitter/>
|
||||
</chain>
|
||||
|
||||
</beans:beans>
|
||||
|
||||
@@ -55,6 +55,9 @@ public class ScatterGatherTests {
|
||||
@Autowired
|
||||
private RequestReplyExchanger gateway;
|
||||
|
||||
@Autowired
|
||||
private MessageChannel scatterGatherWithinChain;
|
||||
|
||||
@Test
|
||||
public void testAuction() {
|
||||
this.inputAuction.send(new GenericMessage<String>("foo"));
|
||||
@@ -83,4 +86,13 @@ public class ScatterGatherTests {
|
||||
assertThat(((List<?>) payload).size(), greaterThanOrEqualTo(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithinChain() {
|
||||
this.scatterGatherWithinChain.send(new GenericMessage<String>("foo"));
|
||||
for (int i = 0; i < 3; i++) {
|
||||
Message<?> result = this.output.receive(10000);
|
||||
assertNotNull(result);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user