liugang created CAMEL-5746:
------------------------------

             Summary: WireTap will always copy the origin Message
                 Key: CAMEL-5746
                 URL: https://issues.apache.org/jira/browse/CAMEL-5746
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.10.2
         Environment: Camel 2.10.2
            Reporter: liugang
            Priority: Minor


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:
{code}
    public WireTapDefinition<Type> copy() {
        setCopy(true);
        return this;
    }

    public boolean isCopy() {
        // should default to true if not configured
        return copy != null ? copy : true;
    }
{code}
So, no matter, we use '.wireTap("XX")' or '.wireTap("XX").copy()' , it will 
always copy the original exchange message.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to