You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Vladislav Krejcirik <vk...@gmail.com> on 2025/06/11 11:34:07 UTC
Unexpected behavior: split + wireTap
Hi All,
We are experiencing unexpected behavior when using .wireTap within .split EIP patterns. Even if we properly close split with .end(), we are seeing the rest of the route being executed more than once, depends on number of lines in our file content. We would expect .end() will close the split and the following route part would be executed just once.
When we replace .wireTap with .to, it works just fine. Do we missing something?
Please see simplified code below.
Code snippet:
// loop through each line of ftp file
.split(simple("${exchangeProperty.ftpFileContent}"))
.wireTap(“direct:logRoute”)
// end split
.end()
// log message after split
.log(“TEST”);
———— Dummy Logging Route
from(“direct:logRoute)
.log(“Dummy Message”);
Thanks in advance,
Vlad
Re: Unexpected behavior: split + wireTap
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Can you post the full route code with the splitter and whatnot as its not
entirely understandable what you problem is.
So can you try explain it better.
On Wed, Jun 11, 2025 at 1:51 PM Vladislav Krejcirik <vk...@gmail.com>
wrote:
> Hi All,
>
> We are experiencing unexpected behavior when using .wireTap within .split
> EIP patterns. Even if we properly close split with .end(), we are seeing
> the rest of the route being executed more than once, depends on number of
> lines in our file content. We would expect .end() will close the split and
> the following route part would be executed just once.
> When we replace .wireTap with .to, it works just fine. Do we missing
> something?
>
> Please see simplified code below.
>
> Code snippet:
>
> // loop through each line of ftp file
> .split(simple("${exchangeProperty.ftpFileContent}"))
>
> .wireTap(“direct:logRoute”)
>
> // end split
> .end()
>
> // log message after split
> .log(“TEST”);
>
>
> ———— Dummy Logging Route
>
> from(“direct:logRoute)
> .log(“Dummy Message”);
>
>
> Thanks in advance,
> Vlad
--
Claus Ibsen