spring-integration

Spring integration for sftp

你说的曾经没有我的故事 提交于 2019-11-30 20:14:45
问题 How can I move file from local system to remote FTP using SFTP adapter. I am going through the examples and all are mentioning to copy files from remote FTP to local machine. I need to move files from local machine to remote system folder. <?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-sftp="http://www.springframework

Spring Integration - programmatically create / teardown channels

时光毁灭记忆、已成空白 提交于 2019-11-30 18:23:23
问题 Is it possible to programmatically create / teardown Spring Integration channels, as opposed to declaring them statically in Spring config? My situation is this: I have a webapp that requires push notifications, so I'm using long polling. Those long polling calls need to block on the server until they get an event. What I'm envisioning (open to alternatives, of course), is a Spring Integration queue channel for each session , each listening to a single pubsub channel. So, when a server event

spring-integration unit test outbound-channel adapter

寵の児 提交于 2019-11-30 18:09:17
问题 i have the following configuration <int:channel id="notificationChannel" datatype="com.mycompany.integration.NotificationMessage"> <int:queue message-store="jdbc-message-store" capacity="1000" /> </int:channel> <int:outbound-channel-adapter ref="notificationHandler" method="handle" channel="notificationChannel" > <int:poller max-messages-per-poll="100" fixed-delay="60000" time-unit="MILLISECONDS" > <int:transactional isolation="DEFAULT" /> </int:poller> </int:outbound-channel-adapter> now i

Spring Integration - Inbound vs Outbound Channel Adapters

旧城冷巷雨未停 提交于 2019-11-30 11:28:05
What is the fundamental difference between inbound and outbound channel adapters? Any examples would be very helpful. I have reviewed the Spring docs and this "directional" distinction is not clear to me. I support an application that has an outbound-channel-adapter configured, but I find the behavior counter intuitive with the outbound label. This adapter gets an external file, then brings it in to the application where we parse the file and persist the data. This is similar to this question, but I wanted to focus more generally on channel adapters, and hopefully get more feedback! Thanks!

How to control the number of parallel Spring Batch jobs

爷,独闯天下 提交于 2019-11-30 09:57:10
I have a report generating application. As preparation of such reports is heavyweight, they are prepared asynchronously with Spring Batch. Requests for such reports are created via REST interface using HTTP. The goal is that the REST resource simply queues report execution and completes ( as described in documentation ). Thus a TaskExecutor has been provided for the JobLauncher: <bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher"> <property name="jobRepository" ref="jobRepository" /> <property name="taskExecutor"> <bean class="org.springframework.core

Move file after successful ftp transfer using Java DSL

╄→尐↘猪︶ㄣ 提交于 2019-11-30 09:55:47
问题 I've defined a flow using spring-integration java dsl to ftp transfer a file, handle it, then transfer it back in an "archive" dir, and at last move it in a local archive dir. Which is something "quite easy" as: @Bean public IntegrationFlow ftpInboundFlow() { if (ftpProperties.getEnabled() == false) { return null; } logger.trace("Starting ftp flow"); return IntegrationFlows .from(source -> source.ftp(ftpSessionFactory()).deleteRemoteFiles(true).preserveTimestamp(true) .filter

Eclipse gradle project's spring xml validation

一个人想着一个人 提交于 2019-11-30 09:41:40
问题 I have a gradle project in my Eclipse with a number of spring-integration context XMLs. These context XML files used to validate okay against the spring-integration schemas but now, for some reason, they are showing 'cvc-complex-type' errors. e.g. I have an element with an error-channel attribute. But on validation, it has started saying: "cvc-complex-type.3.2.2: Attribute 'error-channel' is not allowed to appear in element 'int:gateway'." Now, looking in my Eclipse preferences' General ->

how to plug a TCP-IP client server in a spring MVC application

荒凉一梦 提交于 2019-11-30 05:49:13
问题 I wonder if it is possible to plug a bidirectional connection between a spring mvc application and a legacy system working with TCP-IP connections. as mentionned the legacy system works with TCP/ip and not http , so no need to talk about how HTTP is better , thanks ! 回答1: See Spring Integration. You can simply wire an SI flow into your MVC controller using a messaging gateway Controller->gateway->{optional filtering/transforming}->tcp outbound gateway The gateway is injected into the

Spring Integration Control Bus configuration via annotations

删除回忆录丶 提交于 2019-11-30 05:35:09
问题 Just a simple question: Is there any way to configure Spring Integration Control Bus via annotations (without any xml) <control-bus input-channel="operationChannel"/> ? 回答1: @Bean @ServiceActivator(inputChannel = "controlBusChannel") public ExpressionControlBusFactoryBean controlBus() throws Exception { ExpressionControlBusFactoryBean controlBus = new ExpressionControlBusFactoryBean(); return controlBus; } Note that any outputChannel on the annotation will be ignored; it is defined on the bus

How to test Spring Integration

巧了我就是萌 提交于 2019-11-30 05:34:36
I am new to Spring Integration. I have ActiveMQ with say a 'responseQ'. So when a message arrives on 'responseQ' -> painResponseChannel -> transformer -> processResponseChannel -> beanProcessing. I have following setup: <jms:message-driven-channel-adapter extract-payload="true" channel="painResponseChannel" connection-factory="connectionFactory" destination-name="responseQ"/> <integration:channel id="painResponseChannel" /> <integration-xml:unmarshalling-transformer id="defaultUnmarshaller" input-channel="painResponseChannel" output-channel="processResponseChannel" unmarshaller="marshaller"/>