Skip to content

Commit c58e218

Browse files
authored
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. **Auto-cherry-pick to `6.4.x` & `6.3.x`** Signed-off-by: Jiandong Ma <[email protected]> Co-authored by: Artem Bilan <[email protected]>
1 parent 05ee9ff commit c58e218

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
@@ -299,7 +299,7 @@ public void setMinimumTimeoutForEmptyGroups(long minimumTimeoutForEmptyGroups) {
299299
*/
300300
public void setReleasePartialSequences(boolean releasePartialSequences) {
301301
if (!this.releaseStrategySet && releasePartialSequences) {
302-
setReleaseStrategy(new SequenceSizeReleaseStrategy());
302+
setReleaseStrategy(new SequenceSizeReleaseStrategy(releasePartialSequences));
303303
}
304304
this.releasePartialSequences = releasePartialSequences;
305305
}

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)