Details
Description
When using split() without a aggregation strategy, a NPE will be thrown once the timeout has been exceeded.
Coming from Camel 2 we had not set any AggregationStrategy. With Camel 3 this timeout handling now requires a Aggregation Strategy. Either there should be a default AggregationStrategy or a Null-Check in MulticastProcessor$MulticastTask
Remove the parameter MyAggregationStrategy and execute the test.
NullPointerException will be thrown:
Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.camel.AggregationStrategy.timeout(org.apache.camel.Exchange, int, int, long)" because "strategy" is null
at org.apache.camel.processor.MulticastProcessor$MulticastTask.timeout(MulticastProcessor.java:474)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
For the multicast, there seems to be a default Aggregation Strategy. Maybe something similar can be done for the split?
https://github.com/apache/camel/blob/camel-3.22.x/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/MulticastReifier.java#L118
Attachments
Issue Links
- links to