-
1. Re: Possible bug? Route into several files
davsclaus Apr 14, 2009 5:52 AM (in response to roger)Ah
The issue is possible that the original filename is propagated and then when the file producer is about to write a file (does this for each splitted line) then it sees the original filename and appends to this file. The same happens for the next splitted line to be written.
To use new files for each line you must either:
- provide an unique filename as a header
- remove the filename header so Camel generates an unique filename
In Camel 1.x the filename is stored in the header using the key:
- FileComponent#HEADER_FILE_NAME
that is a constant for the key: org.apache.camel.file.name
In Camel 2.0 its a bit easier to remember as the key is
- CamelFileName
-
2. Re: Possible bug? Route into several files
roger Apr 17, 2009 10:37 AM (in response to davsclaus)Thanks a lot for your clues -- and yes, the filename proved to be the issue! After modifying the resulting filename (using 'expression' file component parameter), the filename was changed and several files were created!