问题
I have configured Spring integration SFTP application to poll file from remote server, and it's working fine if it's running one, where if the same application run's 3 time, to process the files faster, in such case same file is polled by two application's and resulting in duplicate results. how can i avoid this? is there any file locking available in Spring integration?
for configuration part you can look through this SO
回答1:
You need to use persistent file list filters together with a shared metadata store - e.g. Redis see the documentation.
This question has a similar setup for FTP.
来源:https://stackoverflow.com/questions/36336599/spring-sftp-read-file-lock