We are using the spring integration sftp:inbound-channel-adapter to transfer data from a remote host. We would like to keep the files on the remote host. Thus we tried with the delete-remote-files=false option.
<int-sftp:inbound-channel-adapter
id="sftpInboundChannelAdapter"
channel="filesToParse"
session-factory="..."
remote-directory="..."
filename-pattern="..."
local-directory="..."
temporary-file-suffix=".tmp"
delete-remote-files="false"
auto-create-local-directory="true" local-filter="localFileFilter"
>
Unfortunately these files are then processed multiple times. Is there a way of keeping the remote files and not processing them multiple times?
EDIT: this is because a subsequent process deletes the file on the local side.
<bean id="localFileFilter" class="org.springframework.integration.file.filters.AcceptAllFileListFilter"/>