Camel: .wireTap() does not work as expected in a .doCatch() block

Solution Verified - Updated -

Issue

Consider this snippet of code:

 from("...")
            .doTry()
            ...            
           .doCatch (Exception.class)
                .wireTap ("direct:tap")
           .end()
           .log ("After top-level doCatch()");

The final .log() will not be executed unless, for some reason the wire tap route throws an exception. This is not the behaviour that would be expected, from the layout of the code -- it looks as if the .log() will be executed for each exchange.

Environment

  • Red Hat Fuse
    • All versions up to 7.10, and possibly later

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content