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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.17.0
    • 2.17.1, 2.18.0
    • camel-core
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment