Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.17.0
-
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.