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.
Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
Co-authored by: Artem Bilan <artem.bilan@broadcom.com>
(cherry picked from commit c58e21806f)
This commit is contained in:
@@ -283,7 +283,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