spring-integration

javax.management.InstanceAlreadyExistsException while deploying spring application

僤鯓⒐⒋嵵緔 提交于 2019-12-12 10:48:56
问题 <int:poller fixed-delay="${fixedDelay}" default="true"> <int:advice-chain> <ref bean="pollAdvise"/> </int:advice-chain> </int:poller> <bean id="pollAdvise" class="org.springframework.integration.scheduling.PollSkipAdvice"> <constructor-arg ref="healthCheckStrategy"/> </bean> <bean id="healthCheckStrategy" class="test.main.ServiceHealthCheckPollSkipStrategy"> <property name="url" value="${url}"/> <property name="doHealthCheck" value="${doHealthCheck}"/> <property name="restTemplate" ref=

Spring Integration: Splitter exception causes subsequent messages to abort

大兔子大兔子 提交于 2019-12-12 10:19:38
问题 I have the following configuration, where Im trying to process a list of messages that are split by a splitter. The problem Im facing is that an exception in one of the individual message processing causes all subsequent messages to NOT process. Is there something Im doing wrong? <int:chain input-channel="exceptionTestChannel"> <int:splitter/> <int:header-enricher> <int:error-channel ref="myErrorChannel"/> </int:header-enricher> <int:service-activator id="testExceptionService" ref=

Spring boot admin server exception

风格不统一 提交于 2019-12-12 09:59:38
问题 I am trying to add @EnableAdminServer in spring boot application. I am added below three dependencies into my project <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-server</artifactId> <version>1.2.0</version> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-server-ui</artifactId> <version>1.2.0</version> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-starter-admin-client</artifactId>

Spring Integration - Reliable TCP for high volume application

廉价感情. 提交于 2019-12-12 09:17:30
问题 I'm using Spring Integration for TCP server which keeps connections to a few thousand clients. I need the server to throttle clients in case of excessive load and not to lose messages. My server configuration: <task:executor id="myTaskExecutor" pool-size="4-8" queue-capacity="0" rejection-policy="CALLER_RUNS" /> <int-ip:tcp-connection-factory id="serverTcpConFact" type="server" port="60000" using-nio="true" single-use="false" so-timeout="300000" task-executor="myTaskExecutor" /> <int-ip:tcp

Prevent duplicates across restarts in spring integration

此生再无相见时 提交于 2019-12-12 09:13:15
问题 I have to poll a directory and write entries to rdbms. I wired up a redis metadatstore for duplicates check. I see that the framework updates the redis store with entries for all files in the folder [~ 140 files], much before the rdbms entries gets written. At the time of application termination, rdbms has logged only 90 files. On application restart no more files are picked from folder. Properties: msgs.per.poll=10, polling.interval=2000 How can I ensure entries to redis are made after

Create MessageSource for Redis in Spring Integration

守給你的承諾、 提交于 2019-12-12 08:58:53
问题 I want to configure InboundChannelAdapter so that it should pop message from a redis queue and pass it to a ServiceActivator in Java based annotations(only, prefer to avoid XML). I found the code from Spring documentation: @Bean("someAdapter.source") @EndpointId("someAdapter") @InboundChannelAdapter(channel = "channel3", poller = @Poller(fixedDelay = "5000")) public MessageSource<?> source() { return () -> { ... }; } But what I do not understand here is, how can I return MessageSource by

JMS connections exhausted using WebSphere MQ

∥☆過路亽.° 提交于 2019-12-12 08:55:03
问题 I have configured CachingConnectionFactory that wraps a MQTopicConnectionFactory and MQQueueConnectionFactory with cache size set to 10 each. These are than used in several jms:outbound-channel-adapter or jms:message-driven-channel-adapter as part of various spring integration workflows that I have in my application. It is noticed that once in a while the connection count on MQ channel reaches maximum allowed (about 1000) when the process stops functioning. This is a serious problem for a

Message not available at end of Aggregator

喜你入骨 提交于 2019-12-12 06:47:12
问题 I have built a Spring Integration application and transferred some messages around and tried to bring them together with an Aggregator. The application reaches the Aggregator but does not deliver exactly what I want specifically I do not release the group and move onto the next step. My problem however is my aggregator doesn't have the original message (from before the Splitter ). My aggregator is defined as follows <int:aggregator input-channel="deirBoxProcessorToAggregatorChannel" ref=

How to declare and use global variables?

丶灬走出姿态 提交于 2019-12-12 06:25:45
问题 i have a console application.i want to read some configuration settings from DB. And these settings should be stored in a global or session variable so i can use the variable through out the application , how can i implement it ? what are the ways ? which channels do i need to use ? and how payload should be stored? 回答1: It's not at all clear what you mean, but you can declare a Map object as a @Bean (or <bean/> ) and load it up during initialization. You can then reference it directly in

Spring Integration Aggregator failing - “No reply received within timeout” message being displayed

孤街浪徒 提交于 2019-12-12 06:21:21
问题 I am building a Proof of Concept showcasing the end-to-end flow of an XML-based RESTful application built with Spring Integration, the overall idea being the following: 1) A HTTP Inbound Gateway that accepts incoming requests from the calling client 2) A set of @Router, @ServiceActivator, @Splitter & @Aggregator artifacts to process the incoming request and send a set of possible responses (the response XSD has optional elements inside a parent element that get populated based on the use-case