I have an FTP Inbound Adapter which will be deployed on multiple instances of
tomcat. The issue is that all instances will pull files from the remote directory but I need a single file to only be pulled once not by all instances.
Is there a way achieve this?
This is the adapter definition:
<int-sftp:inbound-channel-adapter id="inboundMeasuremntFtpReceiveAdapter" session-factory="inboundMeasurementSftpSession"
auto-startup="${ftp_measurement_autostart}"
local-directory="#{'${dir_interface_home}' + '${dir_interface}' + '${dir_inbound_measurement}' + '${dir_data}'}"
channel="inboundMeasuremntSftpReceiveChannel"
remote-directory="${ftp_measurement_remote_dir}" filename-pattern="*.txt" >
<int:poller id="inboundMeasurementSftpPoller" trigger="inboundMeasurementFtpTrigger" max-messages-per-poll="-1"
error-channel="inboundMeasurementSftpErrorEnrichChannel">
</int:poller>
</int-sftp:inbound-channel-adapter>