Manohar CS
Manohar CS

Reputation: 31

Spring SFTP Integration : Can we copy multiple files from remote to local based on single trigger file

I am working wiht Spring SFTP integration. My use case is to copy multiple csv files from remote directory when _SUCCESS trigger file is written to that particular directory. So basically one process will write multiple CSV files to remote directory and once every thing is done it will create a trigger file _SUCCESS, now sftp inbound channel needs to consume all those .csv files.

Upvotes: 1

Views: 445

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121550

I would make your SFTP Inbound Channel Adapter fully based on the _SUCCESS pattern (or whatever is that file trigger looks) and proceed downstream with an MGET command via SFTP Outbound Gateway: https://docs.spring.io/spring-integration/docs/5.2.0.RELEASE/reference/html/sftp.html#sftp-outbound-gateway

Upvotes: 0

Related Questions