spring-integration

Polling from file using Java DSL - compile error when adding Files.inboundAdapter

青春壹個敷衍的年華 提交于 2019-12-31 06:00:43
问题 I am using Spring Integration Java DSL v. 1.2.2 and following some examples I try to write a code to poll a folder return IntegrationFlows .from(Files.inboundAdapter(new File("/tmp/foo"))) .handle((p, h) -> fileProcessor.process(p)) .get(); This code can not be compiled because "Cannot resolve method 'from(org.springframework.integration.dsl. file.FileInboundChannelAdapterSpec)'" How this can be fixed and how fixed-interval polling can be added? 回答1: Not clear what's going on in your IDE, but

Polling from file using Java DSL - compile error when adding Files.inboundAdapter

时光怂恿深爱的人放手 提交于 2019-12-31 06:00:01
问题 I am using Spring Integration Java DSL v. 1.2.2 and following some examples I try to write a code to poll a folder return IntegrationFlows .from(Files.inboundAdapter(new File("/tmp/foo"))) .handle((p, h) -> fileProcessor.process(p)) .get(); This code can not be compiled because "Cannot resolve method 'from(org.springframework.integration.dsl. file.FileInboundChannelAdapterSpec)'" How this can be fixed and how fixed-interval polling can be added? 回答1: Not clear what's going on in your IDE, but

spring amqp-outbound gateway to produce reply from a different thead (Like jms-outbound gateway)

本秂侑毒 提交于 2019-12-31 05:56:41
问题 Problem statement: Spring amqp-outbound gateway to produce reply from a different thread (Like jms-outbound gateway, having different queue, correlate the request/response using correlation key). Unable to correlate the message with this example. Spring integration <int:gateway id="outboundGateway" service-interface="com.amqp.outbound.gateway.OutboundGateway" default-reply-channel="defaultReplyChannel" > <int:method name="process" request-channel="inboundRequestChannel"/> </int:gateway> <int

spring amqp-outbound gateway to produce reply from a different thead (Like jms-outbound gateway)

老子叫甜甜 提交于 2019-12-31 05:56:08
问题 Problem statement: Spring amqp-outbound gateway to produce reply from a different thread (Like jms-outbound gateway, having different queue, correlate the request/response using correlation key). Unable to correlate the message with this example. Spring integration <int:gateway id="outboundGateway" service-interface="com.amqp.outbound.gateway.OutboundGateway" default-reply-channel="defaultReplyChannel" > <int:method name="process" request-channel="inboundRequestChannel"/> </int:gateway> <int

Which library of spring should I use to send emails with multy-threading

☆樱花仙子☆ 提交于 2019-12-31 05:12:57
问题 I have too many emails. I should write scheduler in order to send messages to them. Messages are different. I use spring framework 4.x. I can write simple class, which connects to SMTP server. But in this case I should write my thread library too in order to send emails parallel. Do spring have already written library which give me more flexible way to do this tasks? I do not want to use threads. It will be nice if spring already have this functionality. Do I need Spring integration for this?

S3: Outbound adapter to place file in multiple target buckets

假如想象 提交于 2019-12-31 05:10:47
问题 have a spring boot application, where I am trying to place a file into multiple S3 bucket using single S3 outbound adapter.. Would like to know if its possible to place the file in multiple bucket using single outbound adapter using spring-integration-aws itself( without using aws -sdk) Any suggestion will be helpful. S3 : Outbound adapter: <int-aws:s3-outbound-channel-adapter id="filesS3Mover" channel="filesS3MoverChannel" transfer-manager="transferManager" bucket="${aws.s3.target.bucket}"

S3: Outbound adapter to place file in multiple target buckets

早过忘川 提交于 2019-12-31 05:10:08
问题 have a spring boot application, where I am trying to place a file into multiple S3 bucket using single S3 outbound adapter.. Would like to know if its possible to place the file in multiple bucket using single outbound adapter using spring-integration-aws itself( without using aws -sdk) Any suggestion will be helpful. S3 : Outbound adapter: <int-aws:s3-outbound-channel-adapter id="filesS3Mover" channel="filesS3MoverChannel" transfer-manager="transferManager" bucket="${aws.s3.target.bucket}"

Spring -XD Stream deployment failure

回眸只為那壹抹淺笑 提交于 2019-12-31 03:54:12
问题 I am trying to deploy two spring-XD streams. Stream 1 and Stream 2. Both the streams are getting deployed fine in the local box (Single node) but when i try to deploy this in higher environment (distributed node) Stream 2 is getting deployed successfully but not stream 1. Here is the Stream Definition Stream --name test definition "CustomSource | Custom Processor 1 | Custom Processor 2 | Custom Processor 3 > queue:TestQueue" Below is the error I am seeing in the admin logs. I believe this is

Spring integration: handle http error with oubound gateway

微笑、不失礼 提交于 2019-12-30 13:30:38
问题 How can I handle exceptions in an http outbound gateway? When i receive status code 500 or 400..., an exception is shown. So What should I do to handle http error using spring integration. My configuration is like: <int:inbound-channel-adapter channel="quakeinfotrigger.channel" expression="''"> <int:poller fixed-delay="60000"></int:poller> </int:inbound-channel-adapter> <int:channel id="quakeinfo.channel"> <int:queue capacity="10" /> </int:channel> <int:channel id="quakeinfotrigger.channel"><

spring integration inbound gateway http request headers

醉酒当歌 提交于 2019-12-30 11:13:15
问题 I have files stored in MongoDB which can be uploaded/downloaded/deleted via a Rest service. I'd like to download files from MongoDB via Spring Integration (+Boot+Embedded Jetty) but I can't figure out how to set the Content-Disposition header properly because the downloaded file has the correct payload but the filename is wrong (it's receiveGateway without any extension): xml config <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=