简体   繁体   English

Spring Integration-FTP下载后立即发送消息

[英]Spring Integration - Send message immediately after FTP download

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? 有没有办法让Spring Integration的FTP入站通道适配器(实际上我正在使用S3入站通道适配器,但它们非常相似)就为下载的每个文件在下载后立即发出一条消息? 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. 我的目录很大,我想在文件到达本地文件系统后立即对其进行处理,而不是等待整个目录下载完毕。

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. 我认为s3项目尚不支持它,但是在FTP中,可以使用ftp-outbound-gateway,它允许使用诸如lsgetrm等命令。这将允许您列出文件夹,拆分列表,并为每个文件分别发出get ,如示例中所示。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM