Skip to content

Commit ea25d57

Browse files
mjd507spring-builds
authored andcommitted
GH-10003: Fix AbstractCorrelatingMessageHandler for releasePartialSequences propagation
Fixes: #10003 Issue Link: #10003 The `AbstractCorrelatingMessageHandler`.setReleasePartialSequences()` populates a `SequenceSizeReleaseStrategy`, but don't propagate the `releasePartialSequences` into that strategy for its "partial" logic. Signed-off-by: Jiandong Ma <[email protected]> Co-authored by: Artem Bilan <[email protected]> (cherry picked from commit c58e218)
1 parent 4a8caef commit ea25d57

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

spring-integration-core/src/main/java/org/springframework/integration/aggregator/AbstractCorrelatingMessageHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public void setMinimumTimeoutForEmptyGroups(long minimumTimeoutForEmptyGroups) {
283283
*/
284284
public void setReleasePartialSequences(boolean releasePartialSequences) {
285285
if (!this.releaseStrategySet && releasePartialSequences) {
286-
setReleaseStrategy(new SequenceSizeReleaseStrategy());
286+
setReleaseStrategy(new SequenceSizeReleaseStrategy(releasePartialSequences));
287287
}
288288
this.releasePartialSequences = releasePartialSequences;
289289
}

spring-integration-core/src/test/java/org/springframework/integration/aggregator/AggregatorTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -133,7 +133,6 @@ public void testAggPerf() throws InterruptedException, ExecutionException, Timeo
133133
public void testAggPerfDefaultPartial() throws InterruptedException, ExecutionException, TimeoutException {
134134
AggregatingMessageHandler handler = new AggregatingMessageHandler(new DefaultAggregatingMessageGroupProcessor());
135135
handler.setCorrelationStrategy(message -> "foo");
136-
handler.setReleasePartialSequences(true);
137136
DirectChannel outputChannel = new DirectChannel();
138137
handler.setOutputChannel(outputChannel);
139138

0 commit comments

Comments
 (0)