spring-integration

Spring Integration - IBM MQ - Consuming large messages from Queue

a 夏天 提交于 2019-12-22 09:47:58
问题 We are using spring integration to connect to IBM MQ V7.5 to read messages from queue. We occasionally get large messages to read. SI jms adapter fails to read to large message, but it works for smaller messages. Below is the exception we are getting 23:18:35,470 WARN DefaultMessageListenerContainer:839 - Setup of JMS message listener invoker failed for destination 'queue:///Cis.Orders' - trying to recover. Cause: JMSWMQ2002: Failed to get a message from destination 'XXX'.; nested exception

Spring integration mail poller

南笙酒味 提交于 2019-12-22 09:23:27
问题 I want to configure a poller for my mail adapter, to run just once or run it programmatically. This is a standalone app (java -jar xxxx.jar) , so I think maybe one option is configure the fixed-rate attribute, to an arbitrary max value and then exit the application, ie: System.exit(0) . Are there more alternatives or some kind of 'correct approach', for this case? This is my integration-context.xml : <int-mail:inbound-channel-adapter id="imapAdapter" store-uri="imaps://${imap.user}:${imap

Spring integration: how to handle exceptions in services after an aggregator?

自作多情 提交于 2019-12-22 07:24:08
问题 I have an application relying on Spring Integration (4.0.4.RELEASE) and RabbitMQ. My flow is as follow: Messages are put in queue via a process (they do not expect any answer): Gateway -> Channel -> RabbitMQ And then drained by another process: RabbitMQ --1--> inbound-channel-adapter A --2--> chain B --3--> aggregator C --4--> service-activator D --5--> final service-activator E Explanations & context The specific thing is that nowhere in my application I am using a splitter: aggregator C

Spring Integration listen on queue without poller

橙三吉。 提交于 2019-12-22 00:24:10
问题 I want to implement the HTTP endpoint using Spring Integration, which listen to the http requests, sends the request data as messages to the channel and another endpoint should listen messages on this channel and process them. Sounds simple. But what I want to achieve is: Messages should be processed in order. Messages should be processed asap (without delay after http request, if the queue is already empty). The http request should be responded as soon as message is received, not after it is

How to carry over header info to errorChannel?

拜拜、爱过 提交于 2019-12-21 17:48:53
问题 In my application, my gateway is receiving request identifier in header, whenever error happens, error channel receives the exception. But it seems like, errorChannel don't take the headers from gateway. Is it possible to carry over the header information to error channel as well? Sample example: sysout in sampleErrorChannel does not has the header which i have passed. https://github.com/manojp1988/spring-integration/blob/master/javadsl/src/main/java/ErrorChannel/ErrorChannelExample.java 回答1:

Waiting for all threads to finish in Spring Integration

梦想与她 提交于 2019-12-21 07:07:40
问题 I have a self-executable jar program that relies heavily on Spring Integration. The problem I am having is that the program is terminating before the other Spring beans have completely finished . Below is a cut-down version of the code I'm using, I can supply more code/configuration if needed. The entry point is a main() method, which bootstraps Spring and starts the import process: public static void main(String[] args) { ctx = new ClassPathXmlApplicationContext("flow.xml"); DataImporter

UDP server with spring-integration

感情迁移 提交于 2019-12-21 05:41:20
问题 I wonder if it is possible to create a UDP server with spring-integration framework that is able to accept requests and return responses. For TCP there are TCP gateways which allow request/response processing but I don't see similar thing for UDP. It is easy to setup UDP listener and receive packets but then I don't see how to return a response as I can only route it to a predefined output channel. Also I don't see sender's IP and port as the transformer doesn't receive the DatagramPacket

Handling exceptions in a Spring-Integration transformer

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 05:16:36
问题 I have a spring-integration transformer that accepts a org.w3c.dom.Document and returns a domain object. And this is nice. If there are elements missing I raise an application exception. However, I'd like to get that exception onto the error channel but instead the way it currently works by bubbling back through a chain of handlers. It would be nice if there a way of specifying an error channel in the case of a failed transform. I could: pass the message through a router to check for missing

How can I create http outbound-gateway with JAVA config in Spring integration?

做~自己de王妃 提交于 2019-12-21 05:07:06
问题 I have the following http outbound gateway. How can I do this configuration with Java Config or Spring DSL? <int-http:outbound-gateway id="test" url="http://localhost:8080/" http-method="POST" charset="UTF-8" header-mapper="soapHeaderMapper" request-factory="requestFactory" request-channel="inputChannel"/> 回答1: @Bean public IntegrationFlow httpOut() { return IntegrationFlows.from("inputChannel") .handle(Http.outboundGateway("http://localhost:8080/") .charset("UTF-8") .httpMethod(HttpMethod

Spring Integration with IBM MQ Series

只谈情不闲聊 提交于 2019-12-21 02:45:18
问题 Am novice when it comes to Spring integration and so had some questions around it. Am trying to integrate Spring Integration with the MQ Series and believe that all my IBM MQ(Q Connection Factory and Queue) entries should be going inside my applicationcontext.xml file. I have the applicationcontext file for ActiveMQ Implementation and just wanted to know what exactly an IBM MQ specific entries in App Contest file will look like. Questions are - Do I need to have an MQ Series installed on the