Sorry, I forgot to include the link to the file. Here we are: 
https://www.filemail.com/d/semdpxvatlusiwc

Thanks,
Vlad

> On 16. 6. 2025, at 10:59, Vladislav Krejcirik <vkrejci...@gmail.com> wrote:
> 
> Hi,
> 
> Sure. I attached complete Camel route. The route name is 
> `IN_FISS_A_RPT111ProcessingRoute`.
> 
> Let me explain the problem again. I’m trying to process each line from file 
> obtained from FTP server. That code is starting with 
> `.split(simple("${exchangeProperty.ftpFileContent}”))`. I do couple things 
> within split. I need to log, set Header parameters and call SQL script. I’m 
> experiencing unexpected behavior when my file has more than one line. The 
> rest of the Camel route (after I end split()) is being executed a number of 
> times equal to the number of lines in the file. So, when I have a file with 
> two lines, I see my steps 080, 090, and 100 being executed twice.
> 
> Thanks,
> Vlad
> 
> 
> <DispatchersRoutes.java>
> On 2025/06/12 19:28:58 Claus Ibsen wrote:
>> 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

Reply via email to