I am using Spring Integration Streaming Inbound Channel Adapter, to get stream from remote SFTP and parse every lines of content process.
I use :
IntegrationFlows.from(Sftp.inboundStreamingAdapter(template)
.filter(remoteFileFilter)
.remoteDirectory("test_dir"),
e -> e.id("sftpInboundAdapter")
.autoStartup(true)
.poller(Pollers.fixedDelay(fetchInt)))
.handle(Files.splitter(true, true))
....
And it can work now. But I can only get file from test_dir
directory, but I need to recursively get files from this dir and sub-directory and parse every line.
I noticed that the Inbound Channel Adapter
which is Sftp.inboundAdapter(sftpSessionFactory).scanner(...)
. It can scan sub-directory. But I didn't see anything for Streaming Inbound Channel Adapter
.
So, how can I implement the 'recursively get files from dir' in Streaming Inbound Channel Adapter
?
Thanks.