spring-integration

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

exception handling in int-jpa:updating-outbound-gateway

谁都会走 提交于 2020-03-27 05:39:36
问题 i have a code <int-jpa:updating-outbound-gateway auto-startup="true" native-query="update Transactions t set t.transaction_Status = :transactionStatus where t.bank_Reference_Number = :bankReferenceNumber " entity-manager="entityManager" persist-mode="PERSIST" use-payload-as-parameter-source="false"> <int-jpa:transactional /> <int-jpa:parameter name="transactionStatus" expression="payload['transactionStatus']" /> <int-jpa:parameter name="bankReferenceNumber" expression="payload[

how to get file with int-ftp:outbound-gateway and remove from server if exists?

北城余情 提交于 2020-03-06 03:20:09
问题 thanks for attention i used int-ftp:outbound-gateway with mget command, i want to when retrieve file from server if file that retrieve from server exists in local directory then thrown bellow exception : org.springframework.messaging.MessagingException: Local file .\backup\a\in\a.in already exists adapter code is: <int-ftp:outbound-gateway id="gatewayGET" local-directory-expression="'./backup/' +#remoteDirectory" session-factory="ftpSessionFactory" request-channel="toGet" reply-channel=

Spring Integraton RSocket and Spring RSocket interaction issues

妖精的绣舞 提交于 2020-03-03 14:01:31
问题 I created a new sample and slipted the codes into client and server side. The complete codes can be found here. There are 3 version of server side. server None Spring Boot app, using Spring Integration RSocket InboundGateway. server-boot Reuse Spring RSocket autconfiguration, and created ServerRSocketConnecter through ServerRSocketMessageHanlder . server-boot-messsagemapping Not use Spring Integration, just use Spring Boot RSocket autconfiguration, and @Controller and @MessageMapping . There

How to set several message handlers for channel in spring integration DSL?

有些话、适合烂在心里 提交于 2020-02-24 17:00:50
问题 I wrote my first spring integration application which reads data from spring RSS and logs it into console: @Configuration @EnableIntegration @IntegrationComponentScan public class DslConfig { @Bean public IntegrationFlow feedFlow() throws MalformedURLException { return IntegrationFlows.from(inBoundFeedDataAdapter(), configurer -> configurer.poller(Pollers.fixedDelay(1000))) .channel(newsChannel()) .transform(source -> { SyndEntry e = ((SyndEntry) source); return e.getTitle() + " " + e.getLink

How to set several message handlers for channel in spring integration DSL?

僤鯓⒐⒋嵵緔 提交于 2020-02-24 17:00:18
问题 I wrote my first spring integration application which reads data from spring RSS and logs it into console: @Configuration @EnableIntegration @IntegrationComponentScan public class DslConfig { @Bean public IntegrationFlow feedFlow() throws MalformedURLException { return IntegrationFlows.from(inBoundFeedDataAdapter(), configurer -> configurer.poller(Pollers.fixedDelay(1000))) .channel(newsChannel()) .transform(source -> { SyndEntry e = ((SyndEntry) source); return e.getTitle() + " " + e.getLink

How to set several message handlers for channel in spring integration DSL?

夙愿已清 提交于 2020-02-24 16:57:19
问题 I wrote my first spring integration application which reads data from spring RSS and logs it into console: @Configuration @EnableIntegration @IntegrationComponentScan public class DslConfig { @Bean public IntegrationFlow feedFlow() throws MalformedURLException { return IntegrationFlows.from(inBoundFeedDataAdapter(), configurer -> configurer.poller(Pollers.fixedDelay(1000))) .channel(newsChannel()) .transform(source -> { SyndEntry e = ((SyndEntry) source); return e.getTitle() + " " + e.getLink

How to set several message handlers for channel in spring integration DSL?

旧时模样 提交于 2020-02-24 16:57:12
问题 I wrote my first spring integration application which reads data from spring RSS and logs it into console: @Configuration @EnableIntegration @IntegrationComponentScan public class DslConfig { @Bean public IntegrationFlow feedFlow() throws MalformedURLException { return IntegrationFlows.from(inBoundFeedDataAdapter(), configurer -> configurer.poller(Pollers.fixedDelay(1000))) .channel(newsChannel()) .transform(source -> { SyndEntry e = ((SyndEntry) source); return e.getTitle() + " " + e.getLink

Spring integration: Best way to implement retry for remote HTTP calls

荒凉一梦 提交于 2020-02-23 06:23:52
问题 I have channel with queue and it has several messages. All of them should go to the remote system via http-outbound-gateway If remote system is not available where do my message go? To the nowhere? How can I retry later? Does there is something like "error-channel" for http-outbound-gateway? PS: I found way I probably like: using transactional chain + PseudoTransactionManager. It works. But could I do it with less XML? 回答1: See this biog post and the associated sample for using the