spring-integration

Multiple channel's message comes into single channel

我只是一个虾纸丫 提交于 2019-12-08 10:21:29
问题 i am fresher of Spring Integration, i am confuing one question which i have multiple channels but now i want to assemble messages from those channel into single channel, how to implement it ? my senario is that i have lots of businees modues and each module will corresponding to one channel, those channels will receive the request then assemble the message into one single channel , then output to the jms server: is below code possible ? <channel id='a'/> <bridge input-channel='a' out-channel=

SpringXD and Spring Integration: Read from kafka topic every X minutes, then send to another Topic

青春壹個敷衍的年華 提交于 2019-12-08 09:35:21
问题 I'm trying to implement a solution to create a SpringXD stream composed by a kafka source, a bridge module, and a kafka sink. So I have something like: <channel id="pollable"> <queue /> </channel> <bridge input-channel="pollable" output-channel="executorChannel"> <poller max-messages-per-poll="5" fixed-rate="5000" /> </bridge> My problem is that I would like to avoid the poller somehow. Basically because I would like to avoid keeping messages in memory when those messages are in the queue. I

usage of spring integration's schema validator?

南楼画角 提交于 2019-12-08 08:09:48
问题 I am new to spring integration. i have below requirement. poll the folder(file system) get the XML file validate against XSD if it is invalid move it to different folder. if it is valid then invoke service activator which will send the xml file as an input to rest ful web service. I have below code: <int-file:inbound-channel-adapter auto-create-directory="true" channel="contentChannel" id="inBoundChannelAdapter" directory="${someFolder}" prevent-duplicates="true"> <int:poller max-messages-per

How to download files from remote server using spring integration sftp outbound gateway?

*爱你&永不变心* 提交于 2019-12-08 08:06:10
问题 I have spring batch setup (remote partitioning), which reads items from files and process them. If input file do not exist, I want to copy them from remote server. So I have added a step listener in that I am trying to download files from remote server using spring integration sftp outbound gateway. public class PrepareExchangeListListener implements StepExecutionListener { private String localDir; private String remoteDir; private DirectChannel requestChannel; private PollableChannel

spring-integration: how to pass post request parameters to http-outbound

一个人想着一个人 提交于 2019-12-08 07:58:03
问题 I need to pass a post request parameters to an int-http:outbound-gateway and can't find any simple way to do this. What I have to do is issue a http request to a couch db fetching multiple documents with a single request as described in the couch db documentation: curl -d '{"keys":["bar","baz"]}' -X POST http://127.0.0.1:5984/foo/_all_docs?include_docs=true So how do I pass the param with the name 'keys' to the int-http:outbound-gateway? (I have all the data I need in the payload of the

Making SFTP outbound gate way pollable for mput operation

爷,独闯天下 提交于 2019-12-08 07:35:26
问题 I am using spring integration for SFTP operation. I need to poll the files with directory structure from a certain location of SFTP and also put files with directory structure from local directory to certain SFTP location. I have added faking inbound channel adapter fro mget & mput opeation. While running Junit , some junk message files are generated in target SFTP location of mput operation. And ,after war is deployed no file is getting transferred to mget local directory. The mput and mget

Best practice for handling low-level socket error in spring integration?

落花浮王杯 提交于 2019-12-08 07:26:44
问题 Hi I'm here again asking for spring integration's tcp-ip related question. Suppose I have a dynamically configured tcp-ip connection factory: <int-ip:tcp-connection-factory id="chatRoomTcpIpClientFactory" type="client" host="${host}" port="${port}" single-use="false" using-nio="false" so-keep-alive="false" so-timeout="${timeout}" serializer="${seri-deseri}" deserializer="${seri-deseri}"/> Here, the host & port are both unknown at the beginning. Sometimes the program cannot grantee that the

Handle expected return from Spring Integration File

妖精的绣舞 提交于 2019-12-08 07:14:54
问题 I have the following configuration file for Spring Integration File: @Configuration @EnableIntegration public class MyIntegrationConfiguration { private static final String FILE_CHANNEL_PROCESSING = "processingfileChannel"; private static final String INTERVAL_PROCESSING = "5000"; private static final String FILE_PATTERN = "*.txt"; @Value("${import.path.source}") private String sourceDir; @Value("${import.path.output}") private String outputDir; @Bean @InboundChannelAdapter(value = FILE

Http Gateways and Json Transformers: stripped headers

本小妞迷上赌 提交于 2019-12-08 04:57:22
问题 Using Spring Integration 4.0.3.RELEASE with Jackson2, I am trying to use Json Transformers in conjunction with http gateways. My pathway looks akin to that of the amqp adapter referenced in the Spring Integration documentation but with http gateways(1): ...->object-to-json-transformer->http-outbound-gateway----> ---->http-inbound-gateway->json-to-object-transformer-> Client: <int:chain id="messageTransformerChain" input-channel="toServer" output-channel="messagesToServer"> ... <int:object-to

Spring Integration Multipart form Uploads route with JSON response not working

血红的双手。 提交于 2019-12-08 04:36:18
问题 I have a spring integration route in xml which will make a web service call (multipart/formdata) and need to return the response in JSON format . The problem is I don't find any good sample SI route that do a multipart request with response. Any help is really appreciated. <?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:context="http://www.springframework.org/schema/context" xmlns:int