ah yes, that is one approach I tried. I think I may have found a problem,
I'm going to work on creating a small reproducible test.

Thanks

On Fri, Jul 24, 2015 at 8:06 AM, Jakub Korab <jakub.korab.li...@gmail.com>
wrote:

> To add to what Claus said, a good way to go about this without getting
> lost in end()s is to do whatever you are doing inside the splitter within a
> sub-route, i.e.:
>
> from(...)
>     .split(body().tokenize("\n")).streaming()
>         .to("direct:processLine")
>     .end()
>     .log("after splitting")
>
> from("direct:processLine")
>     // do whatever you want to the line
>
> Jakub
>
> On 23/07/15 19:03, Claus Ibsen wrote:
>
>> You must be doing some more inside the splitter and you may need 2 x end
>>
>> On Thu, Jul 23, 2015 at 7:45 PM, Wilson MacGyver <wmacgy...@gmail.com>
>> wrote:
>>
>>> hmm, if I understand you correctly, this isn't working for me.
>>>
>>> I have
>>>
>>> from()
>>>
>>> .split(body().tokenize("\n")).streaming()
>>>
>>> .process() /do stuff
>>>
>>> .end()
>>>
>>> .log("${in.body}")
>>>
>>> .to(smtp://)
>>>
>>>
>>> say if the file has 100 lines, I'd except to see the log once if I
>>> understand what you are saying correctly. but I see the log 100 times.
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> On Thu, Jul 23, 2015 at 1:24 PM, Claus Ibsen <claus.ib...@gmail.com>
>>> wrote:
>>>
>>>  You can do that after the splitter
>>>>
>>>> <from>
>>>>    <split>
>>>>      ... inside splitter
>>>>    </split>
>>>>   .. split done
>>>>    <to email> send email here
>>>>
>>>> In Java DSL you can use .end() to end the split block.
>>>>
>>>> On Thu, Jul 23, 2015 at 7:21 PM, Wilson MacGyver <wmacgy...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm processing a large file. so I use .split and .streaming to process
>>>>>
>>>> it a
>>>>
>>>>> record at a time.
>>>>>
>>>>> I would like to send an email alert upon completion of processing the
>>>>>
>>>> file.
>>>>
>>>>> but I can't figure out where to do that.
>>>>>
>>>>> I know I can check to see if it's the last exchange using property
>>>>> "CamelSplitComplete", but it's set to true on the last exchange. So I
>>>>>
>>>> still
>>>>
>>>>> need to let it finish.
>>>>>
>>>>> Is there a good way to this?
>>>>>
>>>>> Thanks,
>>>>> Mac
>>>>>
>>>>> --
>>>>> Omnem crede diem tibi diluxisse supremum.
>>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> -----------------
>>>> http://davsclaus.com @davsclaus
>>>> Camel in Action 2nd edition: http://www.manning.com/ibsen2
>>>>
>>>>
>>>
>>> --
>>> Omnem crede diem tibi diluxisse supremum.
>>>
>>
>>
>>
>


-- 
Omnem crede diem tibi diluxisse supremum.

Reply via email to