spring-integration

How to decompress a Flux<DataBuffer> (and how to write one)?

柔情痞子 提交于 2019-11-30 05:24:10
问题 I have a requirement to read and write compressed (GZIP) streams without intermediate storage. Currently, I'm using Spring RestTemplate to do the writing, and Apache HTTP client to do the reading (see my answer here for an explanation of why RestTemplate can't be used for reading large streams). The implementation is fairly straightforward, where I slap a GZIPInputStream on the response InputStream and move on. Now, I'd like to switch to using Spring 5 WebClient (just because I'm not a fan of

How to: Implement a BatchMessageListenerContainer for bulk consuming a JMS queue

跟風遠走 提交于 2019-11-30 00:34:10
问题 I recently faced the need for a JMS consumer in Spring Integration - capable of consuming burst of high volume without stressing my target Oracle database with too many commits. The DefaultMessageListenerContainer does not seem to support anything but message by message transactions. I googled for solutions and found a couple - but the lot of them suffered from being implemented not by inheritance from DMLC but rather by cloning and modifying the original source code from same - making it

Spring Integration MQTT Subscriber (paho) stops processing messages

岁酱吖の 提交于 2019-11-29 18:01:30
We're experiencing an issue with one of our MQTT subscribers in Spring integration (4.0.3.RELEASE running on Tomcat 7 with the Paho MQTT Client 0.4.0). The issue is with a subscriber on a heavily used topic (lots of messages). The devices sending the messages to the topic are devices in the field connecting over GPRS. Spring integration and the broker (Mosquitto) are running on the same server. The issue seems to appear after doing a couple of redeploys on the Tomcat without restarting the server. When the issue occurs, a restart of the tomcat instance fixes it for a while. Here's the chain of

How to hook up a list of message driven adapters without actually writing each one out?

删除回忆录丶 提交于 2019-11-29 18:00:51
Hey so i need to listen in on like a dozen queues and more or less put all the incoming messages through the same processing flow. I have message driven channel adapters hooked up to each of these queues : <jms:message-driven-channel-adapter id="101InstructionQueue1In" channel="xmedInitiation1PrimaryChannel" auto-startup="true" connection-factory="${XMED.1.PRIMARY}Factory" destination-name="${XMED.1.INITIATION}"/> <jms:message-driven-channel-adapter id="101InstructionQueue2In" channel="xmedInitiation2PrimaryChannel" auto-startup="true" connection-factory="${XMED.2.PRIMARY}Factory" destination

Spring Integration - Inbound vs Outbound Channel Adapters

微笑、不失礼 提交于 2019-11-29 17:07:10
问题 What is the fundamental difference between inbound and outbound channel adapters? Any examples would be very helpful. I have reviewed the Spring docs and this "directional" distinction is not clear to me. I support an application that has an outbound-channel-adapter configured, but I find the behavior counter intuitive with the outbound label. This adapter gets an external file, then brings it in to the application where we parse the file and persist the data. This is similar to this question

Eclipse gradle project's spring xml validation

匆匆过客 提交于 2019-11-29 17:01:24
I have a gradle project in my Eclipse with a number of spring-integration context XMLs. These context XML files used to validate okay against the spring-integration schemas but now, for some reason, they are showing 'cvc-complex-type' errors. e.g. I have an element with an error-channel attribute. But on validation, it has started saying: "cvc-complex-type.3.2.2: Attribute 'error-channel' is not allowed to appear in element 'int:gateway'." Now, looking in my Eclipse preferences' General -> Network Connections -> Cache, I can see that only spring-integration-1.0.xsd is in the cache (which

How to control the number of parallel Spring Batch jobs

感情迁移 提交于 2019-11-29 15:42:40
问题 I have a report generating application. As preparation of such reports is heavyweight, they are prepared asynchronously with Spring Batch. Requests for such reports are created via REST interface using HTTP. The goal is that the REST resource simply queues report execution and completes (as described in documentation). Thus a TaskExecutor has been provided for the JobLauncher: <bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher"> <property name=

Mule ESB vs. Spring Integration [closed]

懵懂的女人 提交于 2019-11-29 14:33:53
问题 The Mule ESB project explains its difference to Spring Integration on its website. However, regarding dcterms.date 2012-07-19T18:43-03:00 of the document, the text might be outdated. The main points of the quoted paragraph are "Spring Integration takes [...] an 'application-centric' approach to integration". "Rather than implement a shared bus, [...] Spring Integration is aimed at providing 'just a little' ESB-style integration to specific applications". "Spring Integration is best suited to

Spring integration - Queue/Poller seems to exhaust threadpool without any action

不羁的心 提交于 2019-11-29 14:29:45
I have a Spring integration app, attached to an AMQP broker. I want to receive messages from an amqp-queue, and update db records. In order to improve performance, I have a pool of workers allowing multiple updates to occur concurrently. I have the following configuration: <int-amqp:inbound-channel-adapter queue-names="pricehub.fixtures.priceUpdates.queue" channel="pricehub.fixtures.priceUpdates.channel" message-converter="jsonMessageConverter"/> <int:channel id="pricehub.fixtures.priceUpdates.channel"> <int:queue /> </int:channel> <int:service-activator ref="updatePriceAction" method=

Using spring integration IMAP adapter, how to fetch an email which was marked “unread” manually?

若如初见. 提交于 2019-11-29 14:10:29
I have a piece of code which uses spring integration's IMAP adapter to poll an inbox to read all incoming emails which are unread and that works perfectly. But if I open any email message and and then mark it as "unread" in my outlook inbox the poller doesn't fetch the marked email. I can use the pop3 adapter which fetches all the email, but deletes them afterwords, but I want to keep the emails in my inbox and I want the poller to fetch all the email which are unseen. Any suggestions to handle this problem? I been searching and reading articles on email adapters but didn't find anything