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

WireTap will always copy the origin Message

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.10.2
    • 2.9.5, 2.10.3, 2.11.0
    • camel-core
    • None
    • Camel 2.10.2

    • Unknown

    Description

      I found the wiretap will always copy the original exchange message after deprecated those methods like wireTap(String uri, boolean copy, Expression body) and wireTap(String uri, boolean copy, Processor processor) .

      Checked the source code of org.apache.camel.model.WireTapDefinition<Type>, the isCopy() and copy() method are:

          public WireTapDefinition<Type> copy() {
              setCopy(true);
              return this;
          }
      
          public boolean isCopy() {
              // should default to true if not configured
              return copy != null ? copy : true;
          }
      

      So, no matter, we use '.wireTap("XX")' or '.wireTap("XX").copy()' , it will always copy the original exchange message.

      Attachments

        Activity

          People

            njiang Willem Jiang
            gangliu liugang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: