Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20844

UseOriginalAggregationStrategy doesn't set EXCEPTION_CAUGHT property on exception propagation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.4.0
    • 4.8.0
    • camel-core
    • None
    • Unknown

    Description

      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: UseOriginalAggregationStrategy aggregate method took the exception and set it to the original exchange (didn’t copy the EXCEPTION_CAUGHT property though)
      • The OnCompletionProcessor in the doProcess method clears the exception sending it down to the onCompletion processors
      • Exchange in the onCompletion processor doesn’t have an exception and has no  EXCEPTION_CAUGHT property.

       
      Is this an expected behavior?
      Should the UseOriginalAggregationStrategy copy the EXCEPTION_CAUGHT property as well? 
      Or probably it would be better if OnCompletionProcessor sets it in case of clearing the exception, wouldn’t it?
       
      Thank you in advance for sharing your thoughts.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              Gomoliako Eduard Gomoliako
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: