Camel Java DSL multicast issue when using AggregationStrategy with shareUnitOfWork set
Issue
- It appears there is an issue with how multicast drives a supplied AggregationStrategy when shareUnitOfWork is set.
- The following fragment works as expected:
.multicast(aggregationStrategy).stopOnException()
- The following fragment behaves differently from the above:
.multicast(aggregationStrategy).stopOnException().shareUnitOfWork()
- The failures superficially appear to indicate that:
- there is an extra call to aggregate adding a duplicate of the first result, see testShared_Grouped
- onCompletion gets called twice, see testShared_Instrumented
- the duplicate onCompletion calls probably explain the failure of testShared_Simple (given how AbstractListAggregationStrategy is implemented)
Environment
- Red Hat JBoss Fuse
- 6.2.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
