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

onCompletion not called on Splitter configured with CompletionAwareAggregationStrategy and shareUnitOfWork=true

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.17.0
    • Fix Version/s: 2.17.1, 2.18.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      In 2.17.0, if a Splitter is configured with shareUnitOfWork=true, then its AggregationStrategy is now wrapped by a ShareUnitOfWorkAggregationStrategy. This causes the following code from MulticastProcessor.doDone() to fail to invoke onCompletion when the configured strategy implements CompletionAwareAggregationStrategy.

      if (strategy instanceof CompletionAwareAggregationStrategy) {
          ((CompletionAwareAggregationStrategy) strategy).onCompletion(subExchange);
      }
      

      It appears the change was a part of CAMEL-9573.

      I haven't completely analyzed the shared unit of work changes but one possible approach to fix this would be to have the ShareUnitOfWorkAggregationStrategy implement CompletionAwareAggregationStrategy and then have its onCompletionMethod delegate to the wrapped strategy iff it also implements CompletionAwareAggregationStrategy.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              jwilliamson Jerry Williamson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: