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
