camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nilsoni <nils...@gmail.com>
Subject Appending index number in file name written in error folder by File component
Date Mon, 26 Sep 2011 09:41:55 GMT
Hi,
In File component URI, I have specified "moveFailed=..." option. Now
whenever there is any error, file is moved to error folder. I have a
requirement where files with same name are provided to input endpoint of
file component and if all of them are failing one by one due to any reason,
they should not be overridden in /error folder. Instead, it should be
written in /error folder with some index appended to it. So for example, 

I have provided abc.txt to File input endpoint 5 times, on error, there
should be 5 files in error folder with following name.
abc1.txt
abc2.txt
abc3.txt
abc4.txt
abc5.txt

Again, this should be done by camel and not by me by writing some index
number in header as i may not be knowing what was the last index used
(application may be shutdown in between multiple runs of flow mentioned
above). Is there any uri option in camel which does this automatically? 




--
View this message in context: http://camel.465427.n5.nabble.com/Appending-index-number-in-file-name-written-in-error-folder-by-File-component-tp4840768p4840768.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message