Hi Can you put together a sample project that demonstrates this and put either on github somewhere, or create a JIRA ticket and attach as .zip file. Then we can take a look at it
On Fri, Jul 2, 2021 at 9:06 AM Klug Andreas (CI/XDM1) <andreas.kl...@de.bosch.com.invalid> wrote: > > Hello everyone, > > I'm using Camel 3.11 with Spring Boot 2.5.1, having a route template > configured in Java DSL approximately like this: > > routeTemplate() > ... > from("quartz://) > ... > .circuitBreaker().resilience4jConfiguration(...) > .process(ExceptionHandlers::patchMDC) > ... > .split()..header(...) > ... > .end() > .endCircuitBreaker() > .onFallback() > ... > .end() > > Unfortunately, running an instance of this template causes an exception (see > stacktrace below). Removing the circuit breaker pattern solves the problem > and the route works fine. > The cause seems to be in MulticastProcessor. The route is null, because the > unit of work is null. The code fragment is passed without exception during > the init phase, but on the first route execution the exception is thrown. > ... > if (route != this.route && this.route != null) { > throw new UnsupportedOperationException("Is this really correct > ?"); > } > ... > > Another thing is, that the MDC lost the breadcrumb id within the circuit > breaker, thus I had to add it again manually. Is that a known design > limitation or a bug? > > Thanks & Best Regards > Andreas > > --- > > java.lang.UnsupportedOperationException: Is this really correct ? > at > org.apache.camel.processor.MulticastProcessor.wrapInErrorHandler(MulticastProcessor.java:1006) > at > org.apache.camel.processor.MulticastProcessor.createProcessorExchangePair(MulticastProcessor.java:988) > at > org.apache.camel.processor.Splitter$SplitterIterable$1.next(Splitter.java:272) > at > org.apache.camel.processor.Splitter$SplitterIterable$1.next(Splitter.java:224) > at > org.apache.camel.processor.Splitter.createProcessorExchangePairsList(Splitter.java:302) > at > org.apache.camel.processor.Splitter.createProcessorExchangePairs(Splitter.java:172) > at > org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:307) > at org.apache.camel.processor.Splitter.process(Splitter.java:157) > at > org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:398) > at > org.apache.camel.processor.Pipeline$PipelineTask.run(Pipeline.java:109) > at > org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:179) > at > org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:64) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:184) > at > org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83) > at > org.apache.camel.support.AsyncProcessorSupport.process(AsyncProcessorSupport.java:41) > at > org.apache.camel.component.resilience4j.ResilienceProcessor.processTask(ResilienceProcessor.java:522) > at > org.apache.camel.component.resilience4j.ResilienceProcessor.access$200(ResilienceProcessor.java:70) > at > org.apache.camel.component.resilience4j.ResilienceProcessor$CircuitBreakerTask.get(ResilienceProcessor.java:583) > at > org.apache.camel.component.resilience4j.ResilienceProcessor$CircuitBreakerTask.get(ResilienceProcessor.java:552) > at > java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) > at > java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596) > at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) > at > java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) > at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) > at > java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2