eip - Apache camel file with doneFileName -


i starting @ apache camel (using blueprint routes) , stuck.

i need process set of csv files different formats. 5 files foo_x_20160110.csv x specifies type of csv file , files have date stamp . these files can quite large 'done' file written once files written. done file named foo_trigger_20160110.csv.

i've seen donefilename option on file supports static name (i have date in filename) or expects done file each input file.

the files have proceeded in fixed order not guaranteed in order written input directory. hence need wait done file.

any idea how can done camel?

any suggestions camel books?

here example documentation http://camel.apache.org/file2.html

from("file:c:/temp/input.txt?donefilename=done"); 

as can see donefilename has static value "done". can use standard java write dynamic names i.e. current dateformat or else , use string operation construct uri. hope helps.

update:

by way, mentioned in documentation there option of dynamic placeholders donefilename.

however more common have 1 done file per target file. means there 1:1 correlation. must use dynamic placeholders in donefilename option. camel supports following 2 dynamic tokens: file:name , file:name.noext must enclosed in ${ }. consumer supports static part of done file name either prefix or suffix (not both).

from("file:bar?donefilename=${file:name}.done"); 

you can use prefix done file, such as:

from("file:bar?donefilename=ready-${file:name}"); 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -