spring-integration

spring mqtt: catch ConnectException

拜拜、爱过 提交于 2019-12-11 10:43:27
问题 I have a question about spring. I make a connection with MQTT broker using Spring-Paho MqttPahoMessageDrivenChannelAdapter . Here is a java config part: @Bean @Description("mqtt inbound adapter: receives mqtt messages") public MessageProducer mqttInboundAdapter() { log.info("creating mqtt inbound adapter"); MqttPahoMessageDrivenChannelAdapter adapter = new MqttPahoMessageDrivenChannelAdapter( env.getProperty("mqtt.hostname")+":" +env.getProperty("mqtt.port"), "myClient", "#"); adapter

SFTP using spring integration

跟風遠走 提交于 2019-12-11 10:25:44
问题 I have a use case where a user drop multiple csv files into remote directory and then place a ready.txt to indicate that files are ready to consume. Our applcation when it see a ready.txt file in the remote directory it should start copying all the files into local directory including ready.txt using sftp file inbound channel adapter. Is there a way to make sure readt.txt file is the last file to be copied to local directory? Because when files are copied from remote directory to local

FTP/FTPS Adapters custom trigger/poller

限于喜欢 提交于 2019-12-11 10:25:33
问题 First, I have just started looking at Spring Integration today, so I have very little experience. I already have a basic scheduled ftp file parser setup using spring integration: <int:channel id="ftpIn" /> <int-ftp:inbound-channel-adapter channel="ftpIn" session-factory="ftpClientFactory" filename-pattern="*.xml" local-directory="${TEMP_DIR}"> <int:poller fixed-rate="${ftp.polling.rate}" /> </int-ftp:inbound-channel-adapter> <bean id="ftpClientFactory" class="org.springframework.integration

How to assign path variables to headers in a java dsl http inbound gateway?

北城以北 提交于 2019-12-11 10:24:46
问题 Hey i can't quite figure out how to convert this: <int-http:inbound-gateway request-channel="eventSinkPayloadChannel" path="/EventSink/{producer}/{consumer}" supported-methods="POST" > <int-http:header name="PRODUCER" expression="#pathVariables.producer"/> <int-http:header name="CONSUMER" expression="#pathVariables.consumer"/> </int-http:inbound-gateway> into the Java DSL. I thought the headerExpression method would be the one to use, Http.inboundGateway("/EventSink/{producer}/{consumer}")

How to handle subflows

拈花ヽ惹草 提交于 2019-12-11 10:23:19
问题 Can we use somehow "subflows" in Spring Integration? I have many different processes which would use the same "subflow". These processes have always the same part which would be good to be put into a separate file. What would be the corrent way to implement these flows? I tried to find a solution to use subflows in Spring Integration but I could not find anything. 回答1: One simple technique is to put the subflow in a separate file with "well-known" input and output channels (the subflow starts

Spring Integration Aggregator with MongoDbMessageStore: Failed to instantiate GenericMessage: No default constructor found

喜你入骨 提交于 2019-12-11 10:17:00
问题 I'm using Spring Integration 4.3.11 with Spring Data MongoDB 1.10.6. I have a message aggregator that uses MongoDbMessageStore . When a message from a message sequence comes in, it's persisted in MongoDB, but immediately after that (in o.s.i.store.AbstractMessageGroupStore#addMessageToGroup ) an exception is thrown when the same message is read from MongoDB that Failed to instantiate [org.springframework.messaging.support.GenericMessage]: No default constructor found Full stacktrace: org

Multiple message processed

房东的猫 提交于 2019-12-11 10:05:29
问题 I have a spring xd source module which pulls file from s3 and splits line by line.I have my spring config as below.But I have 3 container and 1 admin server.Now I see duplicate message being processed by each container as each of them is downloading there own copy. I can solve with making source s3 module deployment count as 1 but my processing of message is getting slow.?Any inputs to solve this? <int:poller fixed-delay="${fixedDelay}" default="true"> <int:advice-chain> <ref bean="pollAdvise

spring integration ftp inbound adapter in distributed mode

此生再无相见时 提交于 2019-12-11 09:59:27
问题 I am using Spring Integration: FTP Inbound Channel Adapter to read files from remote FTP server. My problem is, will it able to handle around 5 millions files per day? If I deploy my project war on 2 different servers in an distributed mode, then will it problematic? Because on both the servers FTP Inbound Channel Adapter will be running. Then both the adapters will read same file twice. Please help me setting up this system in distributed mode. EDIT: I have set up my Spring Integration

WireTap configuration in Spring Integration Java DSL

橙三吉。 提交于 2019-12-11 09:58:21
问题 I've added WireTap configuration to my Spring Integration Java DSL. I reviewed discussion What is the equivalent of logging-channel-adapter in java DSL and now my main Java Config file looks like @Configuration @Import(LoggerConfiguration.class) @EnableIntegration public class ProcessorConfiguration { @Autowired private WireTap wireTap; @Bean public QueueChannel inputChannel() { return MessageChannels.queue(500) .interceptor(wireTap) .get(); } @Bean public PublishSubscribeChannel

Group Timeout does not work as expected in Spring Aggregator

丶灬走出姿态 提交于 2019-12-11 09:58:11
问题 Sample aggregator: <int:aggregator input-channel="msgInput" output-channel="msgOutput" expire-groups-upon-completion="true" group-timeout="1000" expire-groups-upon-timeout="true" send-partial-result-on-expiry="false" ref="msgGroup" /> With sequence size of 2, when I manually iterate the timestamp of each messages grouped with msgGroup, there are still some (not all) messages that is more than 1000ms difference. Is there anything that I missed perhaps? Please note that the correlation ID and