spring-integration

how to implement a TCP connection pool in Spring Integration

那年仲夏 提交于 2019-12-12 01:52:32
问题 I would like to be able to implement a TCP connection pool/factory that will be able to accept a dynamic host during runtime. For example I have an outbound channel adapter that is referenced to a client connection factory. The host will need to change depending on the message in the outbound channel adapter. I know that the host is static in this configuration. My question is, how to customize or extend the class for tcp-connection-factory to be able to connect to changing hosts. Or if there

Spring Integration graph of Spring Tool Suite not showing “int-file:tail-inbound-channel-adapter” graphic

人盡茶涼 提交于 2019-12-12 01:48:01
问题 I'm currently using Spring Tool Suite (STS) (Version: 3.6.3.CI-B2266066, Build Id: 201411050946, Platform: Eclipse Luna SR1 (4.4.1)) with Spring Integration 4.1.0. I have a Spring configuration XML file that includes the "integration" and "integration/file" namespaces. I've added a "int-file:tail-inbound-channel-adapter" to the config file. When I go into the integration-graph tab however I'm not seeing the icon/graphic for that component. Sample config file: <?xml version="1.0" encoding="UTF

Implementing Publish Subscribe using Spring Integration JMS in ActiveMQ

倾然丶 夕夏残阳落幕 提交于 2019-12-12 01:44:16
问题 I have developed a producer and consumer using Spring Integration API's PublishSubscribe Channel in ActiveMQ. I could publish and receive the messages using the implementation but only one service-activator consuming the message in round-robin fashion. I need to make sure whether it is right. Below are my configurations: Producer side: <int:publish-subscribe-channel id="jmsPubSubChannel" /> <int-jms:outbound-channel-adapter channel="jmsPubSubChannel" destination-name="${jms.topic.name}" pub

Pass parameter to Spring soap interceptor

僤鯓⒐⒋嵵緔 提交于 2019-12-12 01:42:56
问题 I have spring integration outbound gateway that makes web service call. I have a interceptor that intercepts soap request and logs to log file. Now I want to pass a parameter to handleRequest method of interceptor class so that I can associate each logged soap request to an id in database. The value id I need to pass to interceptor is stored in headers with name id code looks something like below. <int-ws:outbound-gateway uri="${soap.url} interceptor="interceptor" > </int-ws:outbound-gateway>

Load multiple spring instances at runtime

不羁的心 提交于 2019-12-12 01:34:48
问题 I've built the spring application using Spring Integration (defined in xml) to listen on a specific JMS Topic, transform the data and publish it RabbitMQ queue. In the xml all the configuration data (for example topic name, url, username, password) I externalized to the properties file, which i load in xml using this entry: It's working just fine, but now it appeared that I need to create a webservice that the client can connect to and specify the topic name that he's interested in. The

How to execute some partition step on all servers only once using spring batch partitioning?

一个人想着一个人 提交于 2019-12-12 01:33:15
问题 I am using spring batch partitioning. I read exchanges form files and do some processing for each exchange. exchanges are distributed over 4 servers to do parallel processing using spring batch partitioning. I have first step which prepares input files with exchange ids. I need to read these ids on all servers. Is there any way to run first step on all servers only once to prepare input files on all servers ? I tried by setting grid size = 4 (number of servers) and consumer concurrency 1 so

Spurious error “Cannot correlate response - no pending reply” using TcpOutboundGateway and CachingClientConnectionFactory

心已入冬 提交于 2019-12-12 01:26:46
问题 I am getting spurious correlation errors using TcpOutboundGateway with CachingClientConnectionFactory in a multithreaded context. The log message is: 2015-05-26 14:50:38.406 ERROR 3320 --- [pool-2-thread-2] o.s.i.ip.tcp.TcpOutboundGateway : Cannot correlate response - no pending reply I do not get the error when sending from a single thread, and I have tested and 2 physical machines - Windows 7 and Fedora 20. I am using Spring boot It results in a timeout error for on the send that does not

XMPP Spring Integration Property or field 'json' cannot be found

巧了我就是萌 提交于 2019-12-12 01:24:40
问题 I tried to implement XMPP with Spring Integration using the following tutorial: https://grokonez.com/spring-framework/spring-integration/firebase-cloud-messaging-xmpp-server-example-receive-upstream-messages-spring-integration However I am getting the following error: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'json' cannot be found on object of type 'org.jivesoftware.smack.packet.StandardExtensionElement' - maybe not public or not valid? at org

Spring Integration | Java DSL

江枫思渺然 提交于 2019-12-12 01:17:33
问题 I want to send a file to SFTP server. I have created a outbound flow for it @Bean public IntegrationFlow sftpOutboundFlow() { return IntegrationFlows .from("toSftpChannel") .handle(Sftp.outboundAdapter(this.smileCachedSftpSessionFactory, FileExistsMode.REPLACE) .charset(Charset.forName(fileEncoding)).remoteFileSeparator("/") .remoteDirectory(remoteDirectory).fileNameExpression("payload.getName()") .autoCreateDirectory(true).useTemporaryFileName(true).temporaryFileSuffix(".tranferring")) .get(

Dynamically selecting a RabbitMq queue in Exchange using spring integration

隐身守侯 提交于 2019-12-11 23:52:46
问题 From producer I have to send message to an RabbitMQ Exchange. this message will contain specific attribute, for example , queue name, based on this attribute, I have to dynamically decide the queue to send this message.[queue to bind from exchange, to send this particular message]. is there any way to intercept the message arriving to a RabbitMQ Exchange, using spring integration, At present , I have the following spring integration config file. I don't know to how to create a bean to get