Skip to content

CAMEL-22950: Ensure RecipientList propagates the orignal exchange when using UseOriginalAggregationStrategy#21266

Merged
davsclaus merged 1 commit intoapache:mainfrom
driseley:CAMEL-22950
Feb 5, 2026
Merged

CAMEL-22950: Ensure RecipientList propagates the orignal exchange when using UseOriginalAggregationStrategy#21266
davsclaus merged 1 commit intoapache:mainfrom
driseley:CAMEL-22950

Conversation

@driseley
Copy link
Contributor

@driseley driseley commented Feb 5, 2026

Description

This PR updates the RecipientListProcessor to ensure that the original exchange is set on the AggregationStrategy if it's of type UseOriginalAggregationStrategy. This uses the same technique that is uses in the Splitter Processor: https://github.com/apache/camel/blob/585f77d400b994a4483b200af33c8bd2d7b81cf0/core/camel-core-processor/src/main/java/org/apache/camel/processor/Splitter.java#L105C7-L113

It then updates the UseOriginalAggregationStrategy to ensure that if propagateException is configured and an exception is found, then it safely sets the target for the exception. This approach preserves the original exchange, if no exception is found, which is required for other processors (eg MulticastProcessor)

3 new unit test cases are added to verify the interaction of the RecipientList EIP and UseOriginalAggregationStrategy

Target

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.

  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

…n using UseOriginalAggregationStrategy

Ensure UseOriginalAggregationStrategy handles missing old exchange
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

🌟 Thank you for your contribution to the Apache Camel project! 🌟

🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run

  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot.

  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.

  • Build and test logs are available in the Summary page. Only Apache Camel committers have access to the summary.

  • ⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@davsclaus davsclaus merged commit 05d5155 into apache:main Feb 5, 2026
5 checks passed
davsclaus pushed a commit that referenced this pull request Feb 5, 2026
…n using UseOriginalAggregationStrategy (#21266)

Ensure UseOriginalAggregationStrategy handles missing old exchange
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants