Skip to content

Commit 90e32ee

Browse files
committed
Updated documents and added corrected code formatting
spring-projects#3157
1 parent e1cb0fd commit 90e32ee

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

spring-integration-core/src/test/java/org/springframework/integration/dsl/routers/RouterTests.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,8 @@ public void testNestedScatterGatherSuccess() {
615615
}
616616

617617
@Autowired
618-
@Qualifier("scatterGatherWiretapChannel")
619-
PollableChannel scatterGatherWiretapChannel;
618+
@Qualifier("scatterGatherWireTapChannel")
619+
PollableChannel scatterGatherWireTapChannel;
620620

621621
@Timeout(11000)
622622
@Test
@@ -627,19 +627,19 @@ public void testNestedScatterGatherSequenceTest() {
627627
.setReplyChannel(replyChannel)
628628
.build());
629629

630-
Message<?> wiretapMessage1 = scatterGatherWiretapChannel.receive(10000);
630+
Message<?> wiretapMessage1 = scatterGatherWireTapChannel.receive(10000);
631631
assertThat(wiretapMessage1).isNotNull();
632632
MessageHeaders headers1 = wiretapMessage1.getHeaders();
633-
Message<?> wiretapMessage2 = scatterGatherWiretapChannel.receive(10000);
633+
Message<?> wiretapMessage2 = scatterGatherWireTapChannel.receive(10000);
634634
assertThat(wiretapMessage2).isNotNull()
635635
.extracting(Message::getHeaders)
636-
.isEqualToComparingOnlyGivenFields(headers1, "correlationId", "gatherResultChannel", "sequenceSize", "sequenceNo");
636+
.isEqualToComparingOnlyGivenFields(headers1, "correlationId",
637+
"gatherResultChannel", "sequenceSize", "sequenceNo");
637638
Message<?> receive = replyChannel.receive(10000);
638639

639640
assertThat(receive).isNotNull();
640641
assertThat(receive.getPayload()).isEqualTo("sequencetest");
641642

642-
643643
}
644644

645645
@Configuration
@@ -953,18 +953,19 @@ public IntegrationFlow propagateErrorFromGatherer(TaskExecutor taskExecutor) {
953953
}
954954

955955
@Bean
956-
public PollableChannel scatterGatherWiretapChannel() {
956+
public PollableChannel scatterGatherWireTapChannel() {
957957
return new QueueChannel();
958958
}
959+
959960
@Bean
960961
public IntegrationFlow scatterGatherInSubFlow() {
961962
return flow -> flow.scatterGather(s -> s.applySequence(true)
962-
.recipientFlow(inflow -> inflow.wireTap(scatterGatherWiretapChannel())
963+
.recipientFlow(inflow -> inflow.wireTap(scatterGatherWireTapChannel())
963964
.scatterGather(s1 -> s1.applySequence(true)
964965
.recipientFlow(IntegrationFlowDefinition::bridge)
965966
.recipientFlow("sequencetest"::equals, IntegrationFlowDefinition::bridge),
966967
g -> g.outputProcessor(MessageGroup::getOne)
967-
).wireTap(scatterGatherWiretapChannel()).bridge()),
968+
).wireTap(scatterGatherWireTapChannel()).bridge()),
968969
g -> g.outputProcessor(MessageGroup::getOne));
969970
}
970971

src/reference/asciidoc/aggregator.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,15 @@ NOTE: In the interest of code simplicity and promoting best practices such as lo
117117
Starting with version 5.1, after processing message group, an `AbstractCorrelatingMessageHandler` performs a `MessageBuilder.popSequenceDetails()` message headers modification for the proper splitter-aggregator scenario with several nested levels.
118118
It is done only if the message group release result is not a message or collection of messages.
119119
In that case a target `MessageGroupProcessor` is responsible for the `MessageBuilder.popSequenceDetails()` call while building those messages.
120-
Strting with version 5.3 if sequenceDetails of the outputMessage matches with first message of group, `MessageBuilder.popSequenceDetails()` will be performed.
120+
121+
Additionally, Starting with version 5.3, if `MessageGroupProcessor` returns a Message, `MessageBuilder.popSequenceDetails()` will be performed on the `outputMessage` if the sequenceDetails matches with first message of group.
122+
121123
This functionality can be controlled by a new `popSequence` `boolean` property, so the `MessageBuilder.popSequenceDetails()` can be disabled in some scenarios when correlation details have not been populated by the standard splitter.
122124
This property, essentially, undoes what has been done by the nearest upstream `applySequence = true` in the `AbstractMessageSplitter`.
123125
See <<./splitter.adoc#splitter,Splitter>> for more information.
124126

127+
128+
125129
[[agg-message-collection]]
126130
IMPORTANT: The `SimpleMessageGroup.getMessages()` method returns an `unmodifiableCollection`.
127131
Therefore, if your aggregating POJO method has a `Collection<Message>` parameter, the argument passed in is exactly that `Collection` instance and, when you use a `SimpleMessageStore` for the aggregator, that original `Collection<Message>` is cleared after releasing the group.

src/reference/asciidoc/whats-new.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ See <<./reactive-streams.adoc/reactive-message-handler,ReactiveMessageHandler>>
3333
`spring-integration-mongodb` module now provides channel adapter implementations for Reactive MongoDB driver support in Spring Data.
3434
See <<./mongodb.adoc#mongodb-reactive-channel-adapters,MongoDB Reactive Channel Adapters>> for more information.
3535

36+
[[x5.3-AbstractCorrelatingMessageHandler]]
37+
==== AbstractCorrelatingMessageHandler(Splitter/ScatterGather)
38+
Starting with version 5.3, if `MessageGroupProcessor` returns a Message, `MessageBuilder.popSequenceDetails()` will be performed on the `outputMessage` if the sequenceDetails matches with first message of group.
39+
3640
[[x5.3-general]]
3741
=== General Changes
3842

0 commit comments

Comments
 (0)