On Fri, Oct 26, 2012 at 10:36 AM, liugang <clevers...@gmail.com> wrote:
> Hi All:
>
> 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.
>
> Is It a bug?
>

Ah yeah copy() should accept a boolean so you can control it. Feel
free to log a JIRA.
And a patch is also welcome.

Then @deprecated the copy() method, and add a new copy(boolean)

> Thanks
> GangLiu
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to