Hi,

Your route was working fine when you were reading from the local file
system...
It is right.

In this case you'd leave that all alone and simply put in a new route to
read from the FTP location, 
write it to a local location, and then rename the file. Ok I tryed this and
it works fine.

I have another problem: for each row processed, i write a failed outcome in
csv file and then upload it on FTP Errors folder. 
I follow this link
http://www.davsclaus.com/2010/12/camel-26-using-done-files-with-fileftp.html
to do this, but after processing the whole file the upload of file doesn't
work.

Route is:

<route id="RemoteFileReader">
        <from 
uri="ftp://username@host/IN?password=xxxxxx&move=Save&stepwise=false";>
        <to uri="file:/tmp/localWork" />
</route>

<route id="LocalFileReader">
        <from
uri="file:/tmp/localWork?delete=true&readLock=changed&readLockCheckInterval=5000&readLockTimeout=15000">
... process it
</route>
// OnException
<route id="ReportBuilderRoute">
        <from uri="direct:messageDiscarded" />
        <marshal ref="LoggerDataFormat" />
        <setHeader headerName="OutputUriReport">
        
<simple>{{local.work.directory.report.log}}?fileName=ERR_${file:name.noext}.csv&amp;fileExist=Append&amp;doneFileName=ERR_${file:name.noext}.csv.done</simple>
        </setHeader>
        <recipientList>
                <header>OutputUriReport</header>
        </recipientList>                
</route>
// Upload outcome on FTP
<route id="ReportFileUploader_Route">
        <from
uri="{{local.work.directory.report.log}}?doneFileName=ERR_${file:name.noext}.csv.done&amp;readLock=changed&amp;readLockCheckInterval=5000&amp;readLockTimeout=15000"
/>
        <to
uri="ftp://username@host/IN/Errors?fileName=${file:name.noext}_${date:now:yyyyMMddHHmmss}.csv&password=xxxxx";
/>
</route>

The route is blocked...Any idea? where is the mistake?

Thank you in advance.

Best regards

Michele






--
View this message in context: 
http://camel.465427.n5.nabble.com/FTP-Consumer-has-strange-behaviour-tp5782537p5782584.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to