Hello

I'm using the File component to archive messages sent to topics on an ActiveMQ 
server, using ${date:now:yyyyMMdd} in the filename to automatically rotate 
files.

I'd like to use another Camel route to copy completed log files to an SFTP 
server, but I'm finding it difficult to work out how to identify when a file is 
'complete'. Since messages are written one by one and appended to a file, the 
'doneFIleName' parameter writes a .done file after the first message is logged, 
so I can't use the presence of a doneFile to trigger an upload.

Other options I've looked at include looking at the last modified timestamp, 
and trying to match all files from the previous hour, but I can't get this to 
work.

Is there a reasonably straightforward pattern that can handle exporting 'old' 
files in this way, or should I look at writing a shell script instead?

Peter

Reply via email to