spring-integration-sftp

how can i connect with different SFTP server dynamically?

时光毁灭记忆、已成空白 提交于 2020-06-29 04:29:10
问题 i am using spring integration to move a file from SFTP to local directory. i am able to move files from one sftp server to local, i have 3 4 sftp servers, first i thought about writing different classes for each SFTP server, after my research i found that we can use delegating sessionfactory for setting more than one SFTP using java. i read the documentation but i couldn't implement that. anybody can help me with that. i am adding my code below. @Configuration @EnableIntegration public class

Spring Integration Flow API does not response when empty remote directory

你离开我真会死。 提交于 2020-04-30 09:20:58
问题 I am using spring integration SFTP protocol to transfer files on remote inbound and outbound servers.It works fine when my remote inbound server directory contains any file but it does not response when my remote server directory is empty means there is no file.I am using following piece of code IntegrationFlows.from(Sftp.inboundAdapter(inboundSftp) .localDirectory(this.getlocalDirectory(config.getId())) .deleteRemoteFiles(true) .autoCreateLocalDirectory(true) .filter(new

Spring integration - stop polling if no file returned

不羁的心 提交于 2020-04-19 08:51:57
问题 I have a poller that is polling a remote dir in order to sftp the file across but i want to stop it if it doesn't find the file after x amount of attempts. Is there a simple config for this? ApplicationContext.xml <int-sftp:inbound-channel-adapter id="sftpInboundAdaptor" session-factory="sftpSessionFactory" local-directory="${local.dir}" auto-create-local-directory="true" auto-startup="false" channel="SftpChannel" remote-directory="${remote.dir}" filename-pattern="XXXX" delete-remote-files=

Spring integration - stop polling if no file returned

此生再无相见时 提交于 2020-04-19 08:49:12
问题 I have a poller that is polling a remote dir in order to sftp the file across but i want to stop it if it doesn't find the file after x amount of attempts. Is there a simple config for this? ApplicationContext.xml <int-sftp:inbound-channel-adapter id="sftpInboundAdaptor" session-factory="sftpSessionFactory" local-directory="${local.dir}" auto-create-local-directory="true" auto-startup="false" channel="SftpChannel" remote-directory="${remote.dir}" filename-pattern="XXXX" delete-remote-files=

Streaming from remote SFTP directories and sub-directories with Spring Integration

我的未来我决定 提交于 2020-04-17 22:18:31
问题 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

How to dynamically define file filter pattern for Spring Integration SFTP Inbound Adapter?

社会主义新天地 提交于 2020-01-23 12:05:57
问题 I need to dynamically pull specific files from different directories from different sftp servers to a local server directory of a spring boot application. I store the paths and a file pattern in a postgres database. I got everything working but i don't know how to dynamically define a file filter pattern depending on the remote directory for spring integration sftp inbound adapter so that not all xml files in that specific directory are pulled. I use a RotatingServerAdvice and a

Spring Integration ftp Thread process

断了今生、忘了曾经 提交于 2020-01-17 13:49:28
问题 I am using an bpmn process which is already running using thread and also using spring ftp where the Task scheduler thread is running but I found the application is cannot switch from the threads. Is there any way to invoke the task-scheduler process without any interrupt and I am using InboundchannelAdapter to copy files from FTP. Please suggest any feasible way to resolve the issue. 回答1: I don't see any issues in your question. And to be honest it fully isn't clear. Please, be more specific

REST endpoints in Spring Integration make messaging channels multithreaded

你说的曾经没有我的故事 提交于 2020-01-13 19:45:28
问题 I have a very simple Spring Boot application, which provides a couple of restful endpoints and this is supposed to drive a sftp file being uploaded to a sftp server. My requirement is that if there is more than one file, the files should be queued. I expected to achieve this with the default behaviour of the sftp spring integration workflow, as i read that DirectChannel automatically queues files. To test the behaviour I do the following: Send a big file, blocking the channel for a while by

S3: Outbound adapter to place file in multiple target buckets

假如想象 提交于 2019-12-31 05:10:47
问题 have a spring boot application, where I am trying to place a file into multiple S3 bucket using single S3 outbound adapter.. Would like to know if its possible to place the file in multiple bucket using single outbound adapter using spring-integration-aws itself( without using aws -sdk) Any suggestion will be helpful. S3 : Outbound adapter: <int-aws:s3-outbound-channel-adapter id="filesS3Mover" channel="filesS3MoverChannel" transfer-manager="transferManager" bucket="${aws.s3.target.bucket}"