Hi

Yeah split into 2 or more parts. The ftp that downloads those needed
files into some directory.

And then another route that only pickup the files when you have all 4.
As the aggregation is a bit complicated you may just write some java
code that puts the data correct in the right order.


On Wed, Jul 1, 2015 at 12:12 PM, Walzer, Thomas
<[email protected]> wrote:
> Hi,
>
> scheduled polling is possible. However I would poll all the time.
> For aggregating & sorting I would use a database.
>
> Cheers, Thomas.
>
>> Am 30.06.2015 um 23:57 schrieb Mills, Gary (GE Energy Management, 
>> consultant) <[email protected]>:
>>
>> Hello,
>>
>> Thanks in advance, forgive me as I a learning. I do try to look these things 
>> up also, but with user feedback this greatly helps point me in the right 
>> direction.
>>
>> I have 4 files to pick up from FTP.  I need to join these files together to 
>> achieve 1 single file.  Each file has a unique header. These Headers need to 
>> be aligned. So the aggregation would need to join the files at the end and 
>> beginning of each header. The content of the 1 single file I need to sort by 
>> 2 elements, each row is terminated by new line \n. sort content by a numeric 
>> Id value and its timestamp value( field in record ).  I am looking and it 
>> appears that camel can accomplish this without much coding. Am I correct or 
>> do I need to code this?
>>
>> I am thinking:
>> Import and save the files on the file system. Make sure I have all 4 files. 
>> If I don't have all 4 then wait until next poll and hopefully get the 
>> remaining files. The files are said to be pretty much guaranteed to come in 
>> at specific times. I just want to code for the unexpected event that they 
>> are not all present.
>> So, add FTP endpoint, add FTP route, poll at 4 pm est, and at 4 am est ( I 
>> don't know how to do this or if it can be done in camel ). Then through the 
>> route save the files on the file system. Do another route with aggregation 
>> strategy that will complete on 4 files and the append of the files will need 
>> to start with each header ( I do not know how to do this or if it is 
>> possible with camel ).
>> Msg 1 header A B C
>>                             1 2 3 ( data )
>>                             1 2 3
>> Msg 2 header D E F
>>                             4 5 6
>>                            4 5 6
>> Msg 3 header G H I
>>                             7 8 9
>>                             7 8 9
>> Msg 4 header J K L
>>                            10 11 12
>>                            10 11 12
>> RESULT ===========> A B C D E F G H I J K L
>>                                                1 2 3 4 5 6 7 8 9 10 11 12
>>                                                1 2 3 4 5 6 7 8 9 10 11 12
>>                                                1 2 3 4 5 6 7 8 9 10 11 12
>> Then with another route perform a sort on 2 fields, 1 == asset Id and the 
>> 2nd a timestamp.
>>
>> Please offer suggestions or let me know if this is possible with Camel with 
>> little coding. Thanks again!!!
>> Gary
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to