Eduard Gomoliako created CAMEL-20844:
----------------------------------------
Summary: UseOriginalAggregationStrategy doesn't set
EXCEPTION_CAUGHT property on exception propagation
Key: CAMEL-20844
URL: https://issues.apache.org/jira/browse/CAMEL-20844
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 4.4.0
Reporter: Eduard Gomoliako
I have the following problem: {{onCompletion}} processor on a route can’t find
a caught exception in Exchange that occurred inside {{Split}} with
{{UseOriginalAggregationStrategy}} aggregation strategy.
Long story short: * {{Split}} processor got only one message from the split
expression
* Sending it down to the next processor failed because of exception
* {{RedeliveryErrorHandler}} sets {{EXCEPTION_CAUGHT}} property on the
exchange ({{{}prepareExchangeAfterFailure{}}} method)
* On Aggregation: {color:#000000}{{UseOriginalAggregationStrategy}}
{{aggregate}} method took the exception and set it to the original exchange
(didn’t copy the {color}{{EXCEPTION_CAUGHT}} property though)
* The {color:#000000}{{OnCompletionProcessor}} in the {{doProcess}} method
clears the exception sending it down to the {{onCompletion}} processors{color}
* {color:#000000}Exchange in the {{onCompletion}} processor doesn’t have an
exception and has no {color}{{EXCEPTION_CAUGHT}} property.
{color:#000000}Is this an expected behavior?{color}
{color:#000000}Should the {color}{{UseOriginalAggregationStrategy}} copy the
{{EXCEPTION_CAUGHT}} property as well?
Or probably it would be better if {color:#000000}{{OnCompletionProcessor}} sets
it in case of clearing the exception, wouldn’t it?{color}
{color:#000000} {color}
{color:#000000}Thank you in advance for sharing your thoughts.{color}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)