1
votes

Is there a way to have Spring Integration's FTP Inbound Channel Adapter (actually I'm using the S3 Inbound Channel adapter, but they're very similar) fire off a message for each file it has downloaded, as soon as it has downloaded it? I have a very large directory, and I want to process files as soon as they arrive on my local filesystem, instead of waiting for the whole directory to get downloaded.

1

1 Answers

1
votes

I don't think the s3 project supports it yet, but in FTP, one could use the ftp-outbound-gateway, which allows commands such as ls, get, rm etc. This would allow you to list the folder, split the list, and issue a separate get for each file, as is shown in the sample.

https://github.com/garyrussell/spring-integration-samples/tree/master/basic/ftp