spring-integration

how to register org.springframework.integration.monitor.IntegrationMBeanExporter

自作多情 提交于 2019-12-11 06:40:49
问题 According to http://www.ibm.com/support/knowledgecenter/en/SS7K4U_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/cspr_data_access_tran2.html I "... must register the JMX MBeans with the MBeanServer instance of the container manager in the application server. If you do not specify a server property for the MBean, the MBeanExporter object attempts to detect an MBeanServer instance that is running". I search on internet and I found few Hello World examples telling how to register a bean that I

how to correctly get inbound message headers with spring integration

点点圈 提交于 2019-12-11 06:16:51
问题 I'm receiving email with spring, with a very basic script so far ApplicationContext ac = new ClassPathXmlApplicationContext("imap.xml"); DirectChannel inputChannel = ac.getBean("receiveChannel", DirectChannel.class); inputChannel.subscribe(message -> { System.out.println(message.getHeaders()); System.out.println(message.getPayload()); MessageHeaders headers = message.getHeaders(); String from = (String) headers.get("mail_from"); }); According to the documentation I thought the headers would

Spring Integration JMS with JTA rollback when message goes to errorChannel

老子叫甜甜 提交于 2019-12-11 06:16:25
问题 I am using Spring Integration with JTA support through Atomikos and JMS bound to different Webshpere MQ both inbound and outbound. The flow is the following: JMS inbound channel adapter receive the message some transformations JMS outbound channel adapter to the output queue when an error occurs, the errorChannel receives the message exception type router routes unhandled errors to a custom rethrow service and handled ones to a recipient-list-router that sends them to 2 error queues My

SPRING BATCH : How to configure remote chunking for multiple jobs running in a task executor

时光毁灭记忆、已成空白 提交于 2019-12-11 06:12:45
问题 I am new to spring batch processing. I am using remote chunking where there is a master , multiple slaves and ActiveMQ for messaging. Master has a job and a job launcher and the job launcher has a task-executor which is having following configuration <task:executor id="batchJobExecutor" pool-size="2"queue-capacity="100" /> . Chunk configuration is <bean id="chunkWriter" class="org.springframework.batch.integration.chunk.ChunkMessageChannelItemWriter" scope="step"> <property name=

Use SFTP Outbound Gateway to Obtain Input Stream

被刻印的时光 ゝ 提交于 2019-12-11 05:56:02
问题 I am attempting to process a file exactly like this question: read a remote file line by line The one answer to this question suggests to use RemoteFileTemplate but I am attempting to use the -stream option as suggested in the last comment to the answer. Also, this kinda seems like the point of the -stream option; to get a stream. My implementation successfully obtains the InputStream and kick off a separate thread to process in a BufferedReader. This works happily on windows laptop but

Spring Integration - outbound transfer renaming issues

☆樱花仙子☆ 提交于 2019-12-11 05:55:30
问题 I am using the sample program here to build my code. Everything works fine with the local SFTP test server, When I tested today in my client SFTP servers, it gave me an exception as below. When I debugged I saw the file being written with '.writing' extension on the client's SFTP server. The contents are fine, I don't see any issues with the file that was transferred but the file name is the issue now. After reading through the spring docs, I see that this is the temporary file extension, and

Spring integration - channel adapter vs. gateway (AMQP)

那年仲夏 提交于 2019-12-11 05:47:50
问题 I'm confused about the difference of Channel Adapters and Gateways in spring integration. As stated in https://stackoverflow.com/a/29992267/467944 by @gary-russell channel adapters are un-diirectional while gateways are bi-directional. If this is the case, why there is a amqp inbound gateway as well as an amqp outbound gateway? What I'm trying to accomplish in the end is the following: Http request received within a controller place message on amqp queue consumer consumes messages and put

HttpRequestExecutingMessageHandler: no output-channel or replyChannel header available

邮差的信 提交于 2019-12-11 05:47:18
问题 I'm receiving an error in my application that I am not getting a solution. The application requests a REST/JSON and tries to comunicate with another aplication. There is a poller that invoke each request asynchronously. When a do a request always dispatcher the error "no output-channel or replyChannel header available" and it is redirect to errorChannel handles. ... @Bean(name = PollerMetadata.DEFAULT_POLLER) public PollerMetadata poller() { return Pollers .fixedRate(NumberUtils.createLong

How to create and hold multiple connections in Spring Integration

半世苍凉 提交于 2019-12-11 05:47:13
问题 I have one server and number of clients, server will send response and waits for acknowledgement, additionally I want to hold that connection forever for next message and acknowledgement how should i create these connection in Spring Integration. I read about Spring integration, i couldn't find out the solution for holding the connection. public class ClientCall { public static void main(String[] args) { @SuppressWarnings("resource") ApplicationContext ctx = new

Passing renamed file as input to Outbound adapter/gateway

a 夏天 提交于 2019-12-11 05:45:29
问题 In spring-boot-integration app, wrote a custom locker to rename the original file before locking (fileToLock.getAbsolutePath() + ".lock") and expected lock on file so that any other instance will not be able to process the same file . When file is renaming, its coping the contents from original file and additional file is created with filename.lock with contents and original file also existing with size 0 kb without content. Outbound-gateway taking the original file as input which is without