I have following issue to implement as spring batch application.
I expected significant amount of read data. It's not possible to keep all of it in the memory. My question is can and how I can merge step 3 and 4 into one. And the most importantly how one can streamline data directly to sftp server.
The SFTP Outbound Channel Adapter supports payload as an InputStream
. So, you an transfer data over that stream: https://docs.spring.io/spring-integration/docs/current/reference/html/sftp.html#sftp-outbound.
You can use RemoteFileTemplate
or SftpSession
directly, though in the Spring Batch ItemWriter
.