spring-integration

Using JobLaunchingGateway with spring-batch and spring-integration throwing DestinationResolutionException

孤人 提交于 2019-12-12 21:13:52
问题 I want to scan a directory periodically for files matching a specific pattern and launch a job for the found file. @Configuration @EnableBatchProcessing public class BatchConfiguration { private final JobBuilderFactory jobBuilderFactory; private final StepBuilderFactory stepBuilderFactory; @Autowired public BatchConfiguration(final JobBuilderFactory jobBuilderFactory, final StepBuilderFactory stepBuilderFactory) { this.jobBuilderFactory = jobBuilderFactory; this.stepBuilderFactory =

Spring integration outbound channel adapters not closing the open sockets and leaving the file handles open

♀尐吖头ヾ 提交于 2019-12-12 19:15:22
问题 We are using spring integration adapters for file ftp in our project, the problem we are facing is, the adapters are not closing the open socket connections. As a result, other modules which are in the same managed server are failing with "Too many open files" socket connection exception. Is there a way to close the unused open socket connections from the channel adapters Or Can we get the underlying jsch connections and close the sockets from sftp channel adapters. We have tried caching

paginated data with the help of mongo inbound adapter in spring integration

半腔热情 提交于 2019-12-12 18:33:21
问题 I am using mongo inbound adapter for retrieving data from mongo. Currently I am using below configuration. <int-mongo:inbound-channel-adapter id="mongoInboundAdapter" collection-name="updates_IPMS_PRICING" mongo-template="mongoTemplatePublisher" channel="ipmsPricingUpdateChannelSplitter" query="{'flagged' : false}" entity-class="com.snapdeal.coms.publisher.bean.PublisherVendorProductUpdate"> <poller max-messages-per-poll="2" fixed-rate="10000"></poller> </int-mongo:inbound-channel-adapter> I

web service integration - how to access request Object in response class?

雨燕双飞 提交于 2019-12-12 17:35:08
问题 i have a code to access the web-service which in turn return me a response <int:chain input-channel="balanceChannel" output-channel="processedItems"> <int-ws:outbound-gateway destination-provider="myDestinationProvider" /> </int:chain> <int:service-activator input-channel="processedItems" ref="responseHandler" method="handleResponse" output-channel="nativeQlChannel" /> i am able to get response in my responseHandler , but i also want request object which i send to web-service using channel ?

Tcp connection with Spring Integration framework

对着背影说爱祢 提交于 2019-12-12 16:35:56
问题 I am trying to create a Tcp server which accept inbound connection, and send message to connected clients asynchronously. There is a sample of Tcp server but it is using gateway, which is request/response, does not support async. my goal, server listen to socket, e.g. 9000 a tcp client connect to 9000 server accept connect and receive message. (use TcpReceivingChannelAdapter ?) server keep the connection/socket and make note of the ip_connectId header. when some event or schedule task produce

How execute Spring integration flow in multiple threads to consume more Amazon SQS queue messages in parallel?

自作多情 提交于 2019-12-12 16:15:22
问题 need help I need to create multiple sqs queue consumers that execute in parallel, but i don't know how to achieve this using Sprint Integration I have the following architecture An Amazon SQS queue with 200k messages A Amazon stack with 5 EC2 instances, every instance with tomcat server running a Spring boot application with a Spring Integration flow that consume the messages of SQS using sqs-message-driven-channel-adapter from spring-integration-aws (https://github.com/spring-projects/spring

Spring Integration - Invoking Methods in Application Code

醉酒当歌 提交于 2019-12-12 15:26:34
问题 I have a outbound-channel-adapter, where the relevant configuration is shown below. <int:outbound-channel-adapter channel="foo-fileChannel" ref="foo-handlerTarget" method="handleFeedFile"> <int:poller fixed-delay="5000" receive-timeout="1000" max-messages-per-poll="10" /> </int:outbound-channel-adapter> <int:channel id="foo-fileChannel"> <int:queue /> </int:channel> <bean id="foo-handlerTarget" class="com.abc.FooFeedHandlerImpl"> <property name="fooDescriptorFile" value="${feed.foo

How to set REQUEST HEADER in spring Integration

风流意气都作罢 提交于 2019-12-12 14:22:19
问题 We have a asp page which reading some information form request like this: varLogon = Request.ServerVariables("HTTP_logon") If we want to post something to the asp page using spring integration, we are unable to pass the HTTP_logon to the page, This is not working Any idea, what and how we can set the request header information? <int:header-enricher input-channel="pdfgenheaderchannel" output-channel="pdfgenchannel"> <int:header name="HTTP_ordernumber" method="getOrdernumber" ref="reportbean"/>

graceful shutdown of spring integration flow

和自甴很熟 提交于 2019-12-12 12:32:25
问题 I understand from spring integration monitoring sample https://github.com/spring-projects/spring-integration-samples/tree/master/intermediate/monitoring how control bus can be used to shutdown an integration flow. I was wondering how is @integrationMBeanExporter.stopActiveComponents(false, 20000) different from just shutting down application context applicationContext.stop() in which the flow is loaded. Will that not achieve the same result. 回答1: Actually you are right. From big hight they do

Spring Integration Java DSL — Configuration of aggregator

喜欢而已 提交于 2019-12-12 11:09:09
问题 I have a very simple integration flow, where a RESTful request is forwarded to two providers using a publish-subscribe channel. The result from both RESTful services is then aggregated in a single array. The sketch of the integration flow is as shown below: @Bean IntegrationFlow flow() throws Exception { return IntegrationFlows.from("inputChannel") .publishSubscribeChannel(s -> s.applySequence(true) .subscribe(f -> f .handle(Http.outboundGateway("http://provider1.com/...") .httpMethod