spring-integration

Spring Integration : How to guarantee the transaction two more jdbc-outbound-gateway?

一笑奈何 提交于 2020-01-09 11:30:25
问题 I have the following pattern I have two kinds of databases. One is a internal database where it saves data from 5 json datas from http inbound gateways. The Other is a external database where it saves final refiend data from 5 jsons saved tables. The Process is like the followings. One Transaction ① Each message is saved to each table and return status to the client where it sends data. Second Transaction ② If 5 kinds of datas are completed to receive, it activate one service activator where

Spring: How to configure Messaging Bridge poller with annotations

╄→尐↘猪︶ㄣ 提交于 2020-01-07 05:37:07
问题 I want to be able to throttle requests received from my SubscribableChannel. I do not use a PollableChannel. Will i be able to do an equivalent of this: <bridge input-channel="pollable" output-channel="subscribable"> <poller max-messages-per-poll="10"> <interval-trigger interval="5" time-unit="SECONDS"/> </poller> </bridge> http://docs.spring.io/spring-integration/docs/2.0.0.M4/spring-integration-reference/html/bridge.html using annotations? 回答1: With a bridge handler... @Bean

Spring Integration: Poll HTTP

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-07 03:58:06
问题 How can I poll a HTTP web service using Spring Integration. <int-http:outbound-gateway request-channel="in" reply-channel="out" url="http://whatever.com" http-method="GET" expected-response-type="java.lang.String"/> The http outbound gateway doesn't support poller like the Twitter one. Of course there is the possibility to create a dummy gateway to send empty messages and to configure this using a task scheduler. 回答1: Actually it is a pretty clean and nice solution to create an inbound

Pub-Sub error handling strategy

帅比萌擦擦* 提交于 2020-01-07 02:30:48
问题 Here is my channels set-up: A jdbc message-store backed queue A bridge connecting the queue to a pub-sub channel The poller configured on the pub-sub channel is transactional Now when there is an exception raised in any one of the subscribers then the transaction rolls back and the message is retried for ever. The message is again processed by all the subscribers again. If this is a permanent exception in at least subscriber then the message is not getting processed by none of the other

Consuming messages from MQ and merging in Spring JMS

谁说胖子不能爱 提交于 2020-01-06 06:33:34
问题 I use spring + MQ + Websphere Application server. I want to consume messages from MQ asynchronously and combine the messages to have the List of messages to be easy to persist N number of Entities to Database in every single commit. (without stressing my target Oracle database with too many commits) I use The DefaultMessageListenerContainer and I made the onMessage method synchronized to add on the messages(Till batch size) and I create the Thread to wait for the condition to meet(time/size)

Unable to figure out exhaustive list of Spring integration gradle dependancies for aws

ぐ巨炮叔叔 提交于 2020-01-06 05:33:05
问题 I'm trying to use spring-integration for publishing, subscribing from sqs. I started with the following for my gradle dependancies: compile group: 'org.springframework.cloud', name: 'spring-cloud-aws-messaging', version: '1.0.0.RELEASE' compile group: 'org.springframework.integration', name: 'spring-integration-aws', version: '1.0.0.RELEASE' It was complaining about: ClassNotFoundException:org.springframework.cloud. aws.messaging.listener.SqsMessageD‌​eletionPolicy I then went ahead and added

Configure keep alive to keep connection alive all the time

左心房为你撑大大i 提交于 2020-01-06 05:17:46
问题 I have a tcp client-server application where the client opens a connection which is for single use and disconnects after configured time. How can I configure it keep the connection alive all the time, reconnect on closed connection and ensure multiple clients connections are open to the server. Client config: <int-ip:tcp-connection-factory id="client" type="client" host="${server.TCP.host}" port="${server.TCP.port}" single-use="true" so-timeout="${client.TCP.socketTimeOut}" /> <int-ip:tcp

My tcp client using spring integration not able to get response

徘徊边缘 提交于 2020-01-06 05:09:07
问题 I have created tcp client using spring integration I am able to receive response for my send message . But when I uses localDateTime.now() to log time I am not able to receive the response of send message . I know this can be solved using time setting to make thread wait. As I am new to spring integration So kindly help me how to do it. @Configuration @ComponentScan @EnableAutoConfiguration public class Test { protected final Log logger = LogFactory.getLog(this.getClass()); // ***************

how to configure Spring integration FTP for dynamic inbound?

限于喜欢 提交于 2020-01-06 03:14:10
问题 I am new to spring ftp integration. I want to download files from FTP server using dynamic parameters like host, username, password etc from database. I understand how to downloaded files using static parameters from properties file. I have succeeded in uploading files( ftp outbound ) using dynamic parameters by referring to Dynamic FTP Sample example. Please, help me configuring "inbound dynamic ftp" . I have successfully implemented this but I am facing few new issue with this solution.

How to integrate legacy executables into Spring Integration application?

守給你的承諾、 提交于 2020-01-06 01:58:09
问题 I have some legacy programs in C that work based on the input file and the result go to the output file. Both files are specified in the program arguments. So the call looks like the following: prj.exe a.dat a.out Based on Artem Bilan suggestion I created the project with the following Spring Configuration file. It works in terms of invoking executable! However, I still have the problem with the outbound channel. First, it contains nothing and I am getting the error "unsupported Message