soi-toolkit / soi-toolkit-mule

SOI Toolkit and Mule ESB
Apache License 2.0
6 stars 1 forks source link

File-inbound endpoints may read file several time if polling interval is too short #148

Open hdahl opened 9 years ago

hdahl commented 9 years ago

Original issue 148 created by soi-toolkit on 2011-05-22T14:15:09.000Z:

This problem affects SFTP-resend service file-inbound endpoints and file-inbound endpoints in general.

Problem:

If the file-inbound polling interval is shorter than the time it takes to send/stream the file to an outbound endpoint (i.e. the file is still in the inbound-directory), then the file will be read again, resulting in duplicates for SFTP-outbound (if duplicateHandling="addSeqNo") or overwrites (for example in the case of a file-ountbound endpoint). The re-reading will continue as long as the polling time < transmission time.

This seems to be a known problem with the file-transport, see: http://www.mulesoft.org/jira/browse/MULE-5374 http://www.mulesoft.org/jira/browse/MULE-5131

The bullet-proof solution seems to be to use the "workDirectory" attribute on the file-connector.

hdahl commented 9 years ago

Comment #1 originally posted by soi-toolkit on 2013-10-16T21:40:06.000Z:

Seems fixed for Mule 3.4.0 with: https://www.mulesoft.org/jira/browse/MULE-6731

hdahl commented 9 years ago

Comment #2 originally posted by soi-toolkit on 2014-02-09T21:15:30.000Z:

The solution in Mule 3.4.0 has a problem when fileAge is used for file inbounds, see: MULE-6999, MULE-7160.