You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#3592
* Configure XML parser & Java DSL for Scatter-Gather, based on the
`RecipientListRouter` to set an `applySequence` to `true` by default.
This will make a `gatherer` part to fully rely on the default correlation
strategies
Copy file name to clipboardExpand all lines: spring-integration-core/src/main/java/org/springframework/integration/dsl/BaseIntegrationFlowDefinition.java
+2
Original file line number
Diff line number
Diff line change
@@ -2749,6 +2749,7 @@ public B scatterGather(Consumer<RecipientListRouterSpec> scatterer, @Nullable Co
2749
2749
* Populate a {@link ScatterGatherHandler} to the current integration flow position
2750
2750
* based on the provided {@link RecipientListRouterSpec} for scattering function
2751
2751
* and {@link AggregatorSpec} for gathering function.
2752
+
* For convenience, the {@link RecipientListRouterSpec#applySequence(boolean)} is set to true by default.
2752
2753
* @param scatterer the {@link Consumer} for {@link RecipientListRouterSpec} to configure scatterer.
2753
2754
* @param gatherer the {@link Consumer} for {@link AggregatorSpec} to configure gatherer.
2754
2755
* @param scatterGather the {@link Consumer} for {@link ScatterGatherSpec} to configure
@@ -2760,6 +2761,7 @@ public B scatterGather(Consumer<RecipientListRouterSpec> scatterer, @Nullable Co
2760
2761
2761
2762
Assert.notNull(scatterer, "'scatterer' must not be null");
Copy file name to clipboardExpand all lines: spring-integration-core/src/test/java/org/springframework/integration/scattergather/config/ScatterGatherParserTests-context.xml
Copy file name to clipboardExpand all lines: spring-integration-core/src/test/java/org/springframework/integration/scattergather/config/ScatterGatherTests-context.xml
Copy file name to clipboardExpand all lines: spring-integration-jmx/src/test/java/org/springframework/integration/monitor/ScatterGatherHandlerIntegrationTests.java
+4-7
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2014-2019 the original author or authors.
2
+
* Copyright 2014-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/scatter-gather.adoc
+3-1
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,9 @@ Unlike the `PublishSubscribeChannel` variant (the auction variant), having a `re
35
35
With `apply-sequence="true"`, the default `sequenceSize` is supplied, and the `aggregator` can release the group correctly.
36
36
The distribution option is mutually exclusive with the auction option.
37
37
38
+
NOTE: The `applySequence=true` is required only for plain Java configuration based on the `ScatterGatherHandler(MessageHandler scatterer, MessageHandler gatherer)` constructor configuration since the framework cannot mutate externally provided components.
39
+
For convenience, the XML and Java DSL for `Scatter-Gather` sets `applySequence` to true starting with version 6.0.
40
+
38
41
For both the auction and the distribution variants, the request (scatter) message is enriched with the `gatherResultChannel` header to wait for a reply message from the `aggregator`.
39
42
40
43
By default, all suppliers should send their result to the `replyChannel` header (usually by omitting the `output-channel` from the ultimate endpoint).
@@ -183,7 +186,6 @@ public IntegrationFlow scatterGatherAndExecutorChannelSubFlow(TaskExecutor taskE
Copy file name to clipboardExpand all lines: src/reference/asciidoc/whats-new.adoc
+4
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,10 @@ The messaging annotations don't require a `poller` attribute as an array of `@Po
37
37
38
38
See <<./configuration.adoc#annotations,Annotation Support>> for more information.
39
39
40
+
For convenience, the XML and Java DSL for Scatter-Gather, based on the `RecipientListRouter`, now sets an `applySequence = true`, so the gatherer part can rely on the default correlation strategies.
41
+
42
+
See <<./scatter-gather.adoc#scatter-gather,Scatter-Gather>> for more information.
0 commit comments