Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.7.0
-
None
-
Unknown
Description
WireTap processing does not work when the route uses NoErrorHandler. This behaviour appeared since Camel 3.7.0. I'm using JDK 11.
Here is an example route. The mock:wiretapTarget is not called and a warning is shown in the logs. I was able to reproduce the problem also with a JUnit test (please see the attachment).
from("direct:routeWithNoErrorHandler") .errorHandler(noErrorHandler()) .wireTap("mock:wiretapTarget");
WARN --- [ad #2 - WireTap] o.a.camel.processor.WireTapProcessor : Error occurred during processing Exchange[88F691E00BD6727-0000000000000003] wiretap to mock:wiretapTarget. This exception will be ignored. java.lang.IllegalStateException: SendProcessor has not been started: null at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:102) at org.apache.camel.processor.errorhandler.NoErrorHandler.process(NoErrorHandler.java:46) at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:312) at org.apache.camel.processor.WireTapProcessor.lambda$process$1(WireTapProcessor.java:176) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)