Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16276

WireTap does not work with NoErrorHandler

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.7.0
    • Fix Version/s: 3.7.3, 3.9.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      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)
      

       

        Attachments

        1. WireTapNoErrorHandlerTest.java
          2 kB
          Simo Kivimäki

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              simokivimaki Simo Kivimäki
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: