Is there way I can recursively poll a remote directory using SFTP inbound channel adapter or do I have to have multiple inbound channel adapter one for each sub directory.
My use case is that, each tenant will have a sub directory inside upload directory where they can drop csv files, our application should pool the upload directory to see if any tenant has new files then start downloading locally. Locally it will have the same folder structure.
Remote:
/upload/tenant1/*.csv
/upload/tenant2/*.csv
Local:
/upload/tenant1/*.csv
/upload/tenant2/*.csv
I assume you mean poll
not pool
.
You can use the sftp outbound gateway to recursively list (ls
) or fetch (mget
) from a directory tree.
With mget
you can reflect the remote directory structure locally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With