Reputation: 1977
Is there a way to wire an SFTP Inbound Channel adapter to use S3 backed storage instead of the local filesystem?
Upvotes: 0
Views: 370
Reputation: 121517
I think you need to take a look a bit to different solution - SftpStreamingMessageSource
:
/**
* A message source that produces a message with an {@link InputStream} payload
* referencing a remote file.
*
*/
public abstract class AbstractRemoteFileStreamingMessageSource<F>
extends AbstractFetchLimitingMessageSource<InputStream> implements BeanFactoryAware, InitializingBean {
Using this streaming solution you indeed won't need a local filesystem for storing temporary files what is use in case of plain SftpInboundFileSynchronizingMessageSource
.
https://docs.spring.io/spring-integration/docs/5.0.3.RELEASE/reference/html/sftp.html#sftp-streaming
And yes: that isn't possible to replace built-in FileReadingMessageSource
with some other solution to store temporary files where we read the content from the SFTP files.
Upvotes: 2