Skip to content
Advertisement

Spring Integration file only once from SFTP across several sessions

I have a Spring Integration WorkFlow which downloads files from a SFTP directory. This is done with a RemoteFileInboundChannelAdapterSpec and IntegrationFlows.
Spring Integration remembers within a session which files it has already downloaded, can I do this across sessions e.g. through a database and if so how?

Advertisement

Answer

It is done not within the session, but by some specific FileListFilter implementation . For your goal we suggest an SftpPersistentAcceptOnceFileListFilter where its MetadataStore could really be based on some shared database. See more in docs: https://docs.spring.io/spring-integration/docs/current/reference/html/sftp.html#sftp-inbound

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement