-
Bug
-
Resolution: Done
-
Major
-
fuse-7.7-GA
-
None
-
False
-
False
-
%
-
-
Undefined
-
-
================================
Our use case
================================
We want to write files to a destination with both
- never overwrite existing files, but rename or move them before the new file is written
- avoid consumers reading in progress files, by writing to a temporary filename until the file is complete, and rename it afterwards.
We think this is a very common use case. And Camel File and Sftp component have options to achieve that goal. - "fileExist=Move" should prevent accidential overwriting of target files
- "tempPrefix/tempFileName" should prevent consumers from reading incomplete files
But, unfortunately, when we combine these options, fileExist=Move doesn't work any more. In fact, the destination file will be overwritten.
The documentation states:
- "fileExist=Move": The Move option will move any existing files, before writing the target file. The Move option requires the corresponding moveExisting option to be configured as well.
We use "fileExist=Move" and "moveExisting=arch${date:now:yyyyMMddHHmmssSSS}". - tempPrefix: This option is used to write the file using a temporary name and then, after the write is complete, rename it to the real name.
- tempFileName: The same as tempPrefix option but offering a more fine grained control on the naming of the temporary filename.
We use "tempFileName=__${file:onlyname}.tmp".
The combiniation of these option is not restricted in any way. But it doesn't work.
================================
- clones
-
ENTESB-15098 fileExist=Move is broken when tempFile is also configured
- Done
- links to