spring-integration

SFTP inbound adapter configuration for multiple remote directory using single adapter and single channel

馋奶兔 提交于 2019-12-12 03:25:46
问题 I have configured SFTP inbound channel adapter for polling files from SFTP server to local directory in regular interval. I need to set the SFTP inbound channel adapter for 16, such SFTP folder location. How can I achieve it using single adapter and channel. ****Here is my configuration.**** **<?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:int="http://www.springframework.org/schema

How to name and initialize a class of a service activator dynamically

我们两清 提交于 2019-12-12 03:14:58
问题 This is follow-up on my earlier question How to set payload as constructor-arg value in service-activator. We've 12 different classes like AProcessor, Bprocessor and so on.. and the each constructor accept common payload and execute same declared method in them 'publish'. Now, I was thinking to have single common channel and service activator in SI which can handle this but then how can I put the class name in the expression dynamically which I can derive from the payload.type. I was trying

Spring-Integration- resthttp

瘦欲@ 提交于 2019-12-12 03:08:12
问题 <!-- Inbound/Outbound Channels --> <int:channel id="serviceSearchRequest" /> <int:channel id="serviceSearchResponse" /> <int-http:inbound-gateway id="inboundEmployeeSearchRequestGateway" supported-methods="GET, POST" request-channel="serviceSearchRequest" reply-channel="serviceSearchResponse" mapped-response-headers="Content-Type" path="XXX/service/search" request-payload-type="java.lang.String" reply-timeout="5000"> </int-http:inbound-gateway> In the above configuration if I want to

consuming all the object type messages from a queue

匆匆过客 提交于 2019-12-12 02:59:16
问题 I have the below configuration which will connect to a particular queue on jms and will consume message from that queue and will write to a file now the issue is that on the queue the message is of type object type or of string type also and i want to consume object type message only so for example below is the body of the message which is of object type so the message headers value is ObjectMessage={ Header={ JMSMessageID={ID:LON_TEST_GAWE_4533.351656B16070206DEBAE:1936} JMSDestination=

Task executor will not run next task immediately

痴心易碎 提交于 2019-12-12 02:57:17
问题 I have below configuration where I am trying to process at most 5 requests concurrently. Each request takes much different time to process. What I am noticing it starts processing 5 tasks which is great but when one of the task completes, it does not immediately takes another task, in fact it is waiting for all 5 tasks to complete and then only it starts next 5 tasks. So I am getting some sort of batch processing behavior. May be I have not configured properly, please help to correct this. I

Spring integration poller XML configuration with spring boot

£可爱£侵袭症+ 提交于 2019-12-12 02:45:03
问题 I am working on a project in spring boot and I need to add Spring integration poller for polling files from a location and run spring batch on that file to process it. I have used spring batch integration for this(Document Reference below.) http://docs.spring.io/spring-batch/trunk/reference/html/springBatchIntegration.html In spring boot, I have succesfully configured my poller in @Configuration file as below @Bean @InboundChannelAdapter(value = "fileInputChannel", poller = @Poller( fixedRate

Regex with SpEl usage

给你一囗甜甜゛ 提交于 2019-12-12 02:43:58
问题 How to use regex with SpEL? Would like to append system properties along with SpEL and regex . expected output : devInmessagebase/devInmessagetest/devInmessagesample dev :'env' variable Inmessage : from properties file(in.topic.mesge) asterisk(*) : base/test/sample(anything as suffix) Tried as below and many other ways but not working.any suggestion? <int-kafka:consumer-configuration group-id="default3" value-decoder="kafkaSpecificDecoder" key-decoder="kafkaReflectionDecoder" max-messages="10

Spring Integration : http:inbound-channel adapter - not getting json object in payload

浪子不回头ぞ 提交于 2019-12-12 02:33:23
问题 I am trying to use the spring integration 2.2.0 to get a simple json webservice via http:inbound-channel adapter. I first try to convert the json to an object and get the json in the service activator class and display it. Service activator class: public void receive(Message<?> inMessage){ Map<String, Object> responseHeaderMap = new HashMap<String, Object>(); logger.info("Header:" + inMessage.getHeaders()); logger.info("Payload:" + inMessage.getPayload().toString()); integration xml: <int

Issue with application/json reponse being escaped in Spring Integration 4.2

ε祈祈猫儿з 提交于 2019-12-12 02:24:38
问题 Creating an HTTP proxy in Spring Integration 4.2.1.RELEASE. Environment is using the latest 2.0.0.RELEASE platform BOM, including a spring-webmvc layer - running on Tomcat7. Calls are "application/json", passed through the web layer to a different REST server endpoint (the setupUrl method rewrites the URL). The code successfully calls the external server, gets good response, then mangles the response before it returns to the caller. @Bean public IntegrationFlow httpProxyFlow() { return

Is there an API in spring-xd to write to a message bus?

会有一股神秘感。 提交于 2019-12-12 01:55:48
问题 Considering any message bus can be deployed with spring-xd, is there any API provided by spring-xd that can write to the message bus deployed, say, Kafka/rabbitmq based on the configurations in xd/config/servers.yml or any other such place. I am writing a processor (itemprocessor), which does some processing of the data and the writer will write the data to a rabbitmq queue for now. Since, in the current deployment scenario, rabbitmq may or may not be deployed, the processor should be able to