By the way, as Oleg pointed out in post #3 above, you can also use the gateway to fetch files in subdirectories. For example...
...fetches all files in all subdirectories of directory "a".
<int-ftp:outbound-gateway id="gatewayLS" cache-sessions="false"
<int:channel id="toSplitter" />
<int:splitter id="splitter" input-channel="toSplitter" output-channel="toGet"/>
<int-ftp:outbound-gateway id="gatewayGET" cache-sessions="false"
Thanks for the replies!
I found a similar example in the archive: http://forum.springsource.org/archiv.../t-127972.html
But I would prefer not having to go there :)
I kinda ignored the option using the outbound-gateway. I thought one could not use this to retrieve files. This does preserve the directory structure? There are some issues in Jira that indicate the folder structure is lost.
I'll give the outbound-gateway a try :-)
No, it does, currently, flatten the directory structure,
So it looks like:
Originally Posted by Gary Russell
all properties from the inbound-channel-adapter namespace are on one of those beans? With less comfort I guess :)
<bean id="recursiveFtpSynchronizer" class="org.company.sftp.inbound.RecursiveSftpInboundFileSynchronizer">
<bean id="recursiveFtpMessageSource" class="org.springframework.integration.sftp.inbound.SftpInboundFileSynchronizingMessageSource">
<property name="source" ref="recursiveFtpMessageSource"/>
For the most part, things related to the remote end (session factory etc) go on the synchronizer; things at the local end (local directory etc) go on the MessageSource, although the localFilenameGeneratorExpression goes on the synchronizer. For full details look at the parser.
Thanks for those hints!
I'll give it a try :)