spring-integration

issue in spring xd cluster when deploying my module

♀尐吖头ヾ 提交于 2020-01-05 16:49:19
问题 I have a module s3-puller which pulls file from was s3 .In the production i am facing some issue when i try to create a stream.But local single node it works fine and i tried to set up 3 node cluster and 1 admin node in local it works fine. Below is my application context <?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/integration" xmlns:int

Is there a way to start the file:inbound-channel-adapter through code?

天大地大妈咪最大 提交于 2020-01-05 12:16:41
问题 I have a situation where a particular file is to be copied from a location to another. The polling is not required as the action will be deliberately triggered. Also the directory from which the file is to be picked up is decided at run time. I can have a configuration as follows: <int-file:inbound-channel-adapter id="filesIn" directory="@outPathBean.getPath()" channel="abc" filter="compositeFilter" > <int:poller id="poller" fixed-delay="5000" /> </int-file:inbound-channel-adapter> <int

No suitable HttpMessageConverter found error while executing rest service that takes multipart parameters

亡梦爱人 提交于 2020-01-05 05:48:08
问题 I am using Spring Integration in my project. I am trying to execute a rest service which takes multipart/formdata input parameters. I am using int-http:outbound-gateway to execute rest service. The following is the code: <int:channel id="PQcreateAttachment-Rest-Channel" /> <int:chain input-channel="PQcreateAttachment-Rest-Channel" output-channel="PQcreateAttachment-StoredProcedure-Router" > <int:header-filter header-names="accept-encoding"/> <int:service-activator ref=

spring-integration: MessageProducer may only be referenced once

痴心易碎 提交于 2020-01-05 05:47:09
问题 I want to use a gateway in multiple flows. My gateway definition is: @Bean @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public MarshallingWebServiceOutboundGateway myServiceGateway() { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setPackagesToScan("blah.*"); MarshallingWebServiceOutboundGateway gateway = new MarshallingWebServiceOutboundGateway( serviceEndpoint, marshaller, messageFactory); gateway.setMessageSender(messageSender); gateway.setRequestCallback

PubSubInboundChannelAdapter stops to receive messages after 4th message

帅比萌擦擦* 提交于 2020-01-05 04:14:05
问题 I've created simplified example which reproduces my real problem. My example accepts from google pub/sub, logs it and send ack back to the Pub/Sub Config: @Slf4j @Configuration public class MyConfig implements FlowSupport { private final AppProperties properties; public MyConfig(AppProperties properties) { this.properties = properties; } @Bean public JacksonFactory jacksonFactory() { return JacksonFactory.getDefaultInstance(); } @Bean public MessageChannel bucketNotificationChannel() { return

Spring cloud stream Special Chars in Message received from kinesis

杀马特。学长 韩版系。学妹 提交于 2020-01-04 09:25:00
问题 When I consume the message from kinesis stream. I get some junk chars with headers etc @StreamListener(Processor.INPUT) public void receive(String message) { System.out.println("Message recieved: "+message); throw new RuntimeException("Exception thrown"); } @StreamListener("errorChannel") public void transform(ErrorMessage errorMessage) throws UnsupportedEncodingException { //original paylaod System.out.println("Error Oiginal Message Payload"+new String((byte[])errorMessage.getOriginalMessage

Configure error handling and retry for Http.outboundGateway spring dsl

二次信任 提交于 2020-01-04 06:28:35
问题 I have a requirement where i need to make a rest call when it fails i have to retry 3 times and depending on the status code received i need perform different action, i couldn't find a proper spring integration dsl example. How to configure the error handler and retry @Bean public IntegrationFlow performCreate() { return IntegrationFlows.from("createFlow") .handle(Http.outboundGateway("http://localhost:8080/create") .httpMethod(HttpMethod.GET) .expectedResponseType(String.class)

how to replace string in SpEL expression?

蓝咒 提交于 2020-01-04 04:26:08
问题 firstly,thanks for attention i defined ftp adapter in my spring integration project and used mv command to move files in ftp server,directory structure is: ftp-root -----------Directory1\ -----------------in\ ---------------------------file.in -----------------out\ i want to move file file.in in ftp-root\Directory1\in\ directory to move ftp-root\Directory1\out\ with .out.rpt extension ftp-root\Directory1\out\a.out i used int-ftp:outbound-gateway adapter to run mv command on ftp server,my code

Spring integration XMPP and Google Cloud Messaging

六月ゝ 毕业季﹏ 提交于 2020-01-04 04:05:27
问题 I'm using the spring integration xmpp module to write a custom implementation of a 3rd party Server connecting to GCM cloud services, as in GCM Cloud Connection Server (XMPP). So far I've successfully connected to the GCM server, however when I send a message to the server I end up with something like: <message id="m-1366082849205" to="REGISTRATION_ID"> <body>{"hello":"world"}</body> </message> , but I need to send something like this: <message id=""> <gcm xmlns="google:mobile:data"> { "to":

Spring Integration SpEL issues with annotation

…衆ロ難τιáo~ 提交于 2020-01-03 21:08:12
问题 I have my fileMessageProvider() as @InboundChannelAdapter( value = "files" , poller = @Poller( fixedDelay = "${my.poller.interval}", maxMessagesPerPoll = "1" )) public Message<File> fileMessageProvider() { ... } Gives NumberFormatException upon deployment Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myPoller' defined in "../MyPoller.class": Initialization of bean failed; nested exception is java.lang