GH-10003: Fix AbstractCorrelatingMessageHandler for releasePartialSequences propagation
Fixes: #10003 Issue Link: https://github.com/spring-projects/spring-integration/issues/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 <jiandong.ma.cn@gmail.com> Co-authored by: Artem Bilan <artem.bilan@broadcom.com>
This commit is contained in:
@@ -299,7 +299,7 @@ public abstract class AbstractCorrelatingMessageHandler extends AbstractMessageP
|
||||
*/
|
||||
public void setReleasePartialSequences(boolean releasePartialSequences) {
|
||||
if (!this.releaseStrategySet && releasePartialSequences) {
|
||||
setReleaseStrategy(new SequenceSizeReleaseStrategy());
|
||||
setReleaseStrategy(new SequenceSizeReleaseStrategy(releasePartialSequences));
|
||||
}
|
||||
this.releasePartialSequences = releasePartialSequences;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -133,7 +133,6 @@ public class AggregatorTests {
|
||||
public void testAggPerfDefaultPartial() throws InterruptedException, ExecutionException, TimeoutException {
|
||||
AggregatingMessageHandler handler = new AggregatingMessageHandler(new DefaultAggregatingMessageGroupProcessor());
|
||||
handler.setCorrelationStrategy(message -> "foo");
|
||||
handler.setReleasePartialSequences(true);
|
||||
DirectChannel outputChannel = new DirectChannel();
|
||||
handler.setOutputChannel(outputChannel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user