You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "stijn.haezebrouck" <ca...@haezebrouck.be> on 2012/03/20 10:24:51 UTC

wireTap issue: Exchange is empty while copy defaults to true

Hello,

Using Camel 2.9.1, consider the routeBuilder (in DSL)



The routing goes fine to the target FTP, but does not write the test.txt
file. For the "direct:tap" route, I am getting the warning:



According to tracing, the endpoint .to("file://test.txt") exists and is
created, but it seems that somehowe, the Exchange is empty?
(Exchange[null]). This is strange, as the default behaviour would be to copy
the in part of the exchange message.
Does anyone know why this is empty? How can I correct this?


--
View this message in context: http://camel.465427.n5.nabble.com/wireTap-issue-Exchange-is-empty-while-copy-defaults-to-true-tp5579435p5579435.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: wireTap issue: Exchange is empty while copy defaults to true

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Mar 20, 2012 at 9:24 PM, Reuben Garrett <re...@gmail.com> wrote:
> Is this a scenario where the WireTap's onPrepareRef might be helpful to
> capture the needed information from the tapped Exchange before its parent
> message is consumed?
>

Yes that could be an option.

> ~ RNPG
>
> On Tue, Mar 20, 2012 at 05:08, Claus Ibsen <cl...@gmail.com> wrote:
>
>> You use local work directory with the FTP endpoint which means the
>> file is stored temporary in that directly.
>> And when the message is done being processed the file is deleted.
>>
>> So when you tap the message, you only tap a java.io.File handle to
>> that temporary file.
>>



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: wireTap issue: Exchange is empty while copy defaults to true

Posted by Reuben Garrett <re...@gmail.com>.
Is this a scenario where the WireTap's onPrepareRef might be helpful to
capture the needed information from the tapped Exchange before its parent
message is consumed?

~ RNPG

On Tue, Mar 20, 2012 at 05:08, Claus Ibsen <cl...@gmail.com> wrote:

> You use local work directory with the FTP endpoint which means the
> file is stored temporary in that directly.
> And when the message is done being processed the file is deleted.
>
> So when you tap the message, you only tap a java.io.File handle to
> that temporary file.
>

Re: wireTap issue: Exchange is empty while copy defaults to true

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Mar 20, 2012 at 10:24 AM, stijn.haezebrouck
<ca...@haezebrouck.be> wrote:
> Hello,
>
> Using Camel 2.9.1, consider the routeBuilder (in DSL)
>
>
>
> The routing goes fine to the target FTP, but does not write the test.txt
> file. For the "direct:tap" route, I am getting the warning:
>
>
>
> According to tracing, the endpoint .to("file://test.txt") exists and is
> created, but it seems that somehowe, the Exchange is empty?
> (Exchange[null]). This is strange, as the default behaviour would be to copy
> the in part of the exchange message.
> Does anyone know why this is empty? How can I correct this?
>

You use local work directory with the FTP endpoint which means the
file is stored temporary in that directly.
And when the message is done being processed the file is deleted.

So when you tap the message, you only tap a java.io.File handle to
that temporary file.


>
> --
> View this message in context: http://camel.465427.n5.nabble.com/wireTap-issue-Exchange-is-empty-while-copy-defaults-to-true-tp5579435p5579435.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/