spring-integration

Why does Spring Integration have several XML schemas, and which one should I use?

99封情书 提交于 2019-11-28 08:05:50
问题 To use Spring Integration in a Spring XML configuration file, I need to declare the si namespace, and provide the schema location of the XML Schema: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int="http://www.springframework.org/schema/integration" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring

Stopping a file inbound channel adapter after one one file is read

喜你入骨 提交于 2019-11-28 06:27:51
问题 Our application uses a Spring Integration file:inbound-channel-adapter to poll a directory to listen to when a file is dropped there. Spring Integration then starts a Spring Batch job, handing over to the job the path and name of the file to process. Obviously, the file poller continues to run even after a file has been processed by the Spring Batch job. So, the Spring context remains open and the application does not terminate. Is there a way, programatically or through configuration

Spring Integration tcp client multiple connections

本秂侑毒 提交于 2019-11-28 05:27:19
问题 I use Spring Integration tcp-outbound-adapter and tcp-inbound-adapter in order to communicate with a third party external system through TCP. The connection factory I use is of type "client" and has single-use="false", because the nature of communication with the external system is a session of several dozens requests and replies. The external system expects I will open a new TCP connection for each session. Is there any way to do that with Spring Integration? My code uses SI successfully for

Spring AMQP + RabbitMQ 3.3.5 ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN

泪湿孤枕 提交于 2019-11-28 05:10:03
I am getting below exception org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile. Configuration: RabbitMQ 3.3.5 on windows On Config file in %APPDATA%\RabbitMQ\rabbit.config I have done below change as per https://www.rabbitmq.com/access-control.html [{rabbit, [{loopback_users, []}]}]. I also tried creating a user/pwd - test/test doesn't seem to make it work. Tried the Steps from this post. Other Configuration Details are as below:

how dynamic create ftp adapter in spring integration?

喜夏-厌秋 提交于 2019-11-28 01:37:23
Thanks for attention i used spring integration in my project, i want to retrieve many input file from multiple ftp server with different address as bellow image: how to create dynamically inbound-adapter in my project to polling and retrieve files from servers? Gary Russell See the dynamic-ftp sample . While it only covers the outbound side, there are links in the README to discussions about what needs to be done on the inbound side (put each adapter in a child context that send messages to a channel in the main context). Also see my answer to a similar question for multiple IMAP mail adapters

Spring AMQP + RabbitMQ 3.3.5 ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN

佐手、 提交于 2019-11-27 19:18:59
问题 I am getting below exception org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile. Configuration: RabbitMQ 3.3.5 on windows On Config file in %APPDATA%\RabbitMQ\rabbit.config I have done below change as per https://www.rabbitmq.com/access-control.html [{rabbit, [{loopback_users, []}]}]. I also tried creating a user/pwd - test/test

When to use Spring Integration vs. Camel?

廉价感情. 提交于 2019-11-27 16:43:24
As a seasoned Spring user I was assuming that Spring Integration would make the most sense in a recent project requiring some (JMS) messaging capabilities ( more details ). After some days working with Spring Integration it still feels like a lot of configuration overhead given the amount of channels you have to configure to bring some request-response (listening on different JMS queues) communications in place. Therefore I was looking for some background information how Camel is different from Spring Integration, but it seems like information out there are pretty spare, I found: http://java

Using a request scoped bean outside of an actual web request

天大地大妈咪最大 提交于 2019-11-27 15:40:52
问题 I have a web application that has a Spring Integration logic running with it in a separated thread. The problem is that at some point my Spring Integration logic tries to use a request scoped bean and then i get the following errors: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.tenantContext': Scope 'request' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from

spring integration + cron + quartz in cluster?

时光怂恿深爱的人放手 提交于 2019-11-27 08:57:53
I have a spring integration flow triggered by the cron expression like follows: <int-ftp:inbound-channel-adapter id="my-input-endpoint" ...> <int:poller trigger="my-trigger"/> </int-ftp:inbound-channel-adapter> <bean id="my-trigger" class="org.springframework.scheduling.support.CronTrigger"> <constructor-arg value="0 * * * * *" /> </bean> It works fine. But now I have to extend the implementation to make it cluster ready (job execution on only one cluster node at the same point of time). My wish would be to use the Quartz framework in the cluster mode (persisting the job status in the database

Could not extract response: no suitable HttpMessageConverter found for response type

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 06:41:14
问题 I am new with spring integration and working in spring integration http module for my project requirement. I am sending request from outbound gateway as a http client. I am trying to initiate a request to the server and server should return me the message payload with my set values. I am converting object to JSON using to send to server I am sending a request to inbound gateway present on the server side from client(HttpClientDemo) shown below. For that purpose, I am converting my object into