spring-integration

Why are ID and TIMESTAMP declared as transient headers in Spring Integration?

天大地大妈咪最大 提交于 2020-02-06 13:28:28
问题 I'm trying to send/receive messages via Spring Integration's AMQP in/outbound adapters and I'm facing this problem. After finding Gary's answer here, I started to investigate if my app sets a message ID correctly. In fact, it's taken care of automatically here. The producer looks like this. I send a wrong message on purpose and at the consumer's end I watch its message transformer fail here. After that the message gets re-queued and re-processed again endlessly. While debugging this issue, I

Why are ID and TIMESTAMP declared as transient headers in Spring Integration?

我的梦境 提交于 2020-02-06 13:27:28
问题 I'm trying to send/receive messages via Spring Integration's AMQP in/outbound adapters and I'm facing this problem. After finding Gary's answer here, I started to investigate if my app sets a message ID correctly. In fact, it's taken care of automatically here. The producer looks like this. I send a wrong message on purpose and at the consumer's end I watch its message transformer fail here. After that the message gets re-queued and re-processed again endlessly. While debugging this issue, I

Stored Procedure Outbound Gateway is failing to execute a valid stored procedure

梦想与她 提交于 2020-02-06 04:06:25
问题 We are using spring-integration in our project. I am using int-jdbc:stored-proc-outbound-gateway to execute a stored procedure. I am getting the following error when I use Spring-Integration layer to hit the stored procedure.But strangely the same stored procedure is getting executed successfully from SQL Developer and inserting the required row into the table. 2016-07-01 11:45:49,254 DEBUG http-0.0.0.0-8080-4 [org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] Translating

spring integration dsl filter instead filter method annotation

|▌冷眼眸甩不掉的悲伤 提交于 2020-02-03 11:41:52
问题 How can I switch from filter annotation method to Spring integration java DSL filter. how can I call filter method? IntegrationFlows.from("removeSession") // remove chat session from user sessions map .handle("sessionLogService", "removeChatSession") // continue and remove user from ehcache only if user have no more opened sessions. .filter(/* what's going here? */) .get(); instead Filter annotation. @Filter(inputChannel = "userGoOfflineFilter", outputChannel = "userGoOffline") public boolean

spring integration dsl filter instead filter method annotation

杀马特。学长 韩版系。学妹 提交于 2020-02-03 11:41:43
问题 How can I switch from filter annotation method to Spring integration java DSL filter. how can I call filter method? IntegrationFlows.from("removeSession") // remove chat session from user sessions map .handle("sessionLogService", "removeChatSession") // continue and remove user from ehcache only if user have no more opened sessions. .filter(/* what's going here? */) .get(); instead Filter annotation. @Filter(inputChannel = "userGoOfflineFilter", outputChannel = "userGoOffline") public boolean

Spring Integration - how to send POST parameters with http outbound-gateway

99封情书 提交于 2020-02-02 11:51:51
问题 I'm trying to put together a really simple HTTP POST example using Spring Integration and a http outbound-gateway. I need to be able to send a HTTP POST message with some POST parameters, as I would with curl : $ curl -d 'fName=Fred&sName=Bloggs' http://localhost I can get it working (without the POST parameters) if I send a simple String as the argument to the interface method, but I need to send a pojo, where each property of the pojo becomes a POST parameter. I have the following SI config

Spring Integration - how to send POST parameters with http outbound-gateway

给你一囗甜甜゛ 提交于 2020-02-02 11:50:31
问题 I'm trying to put together a really simple HTTP POST example using Spring Integration and a http outbound-gateway. I need to be able to send a HTTP POST message with some POST parameters, as I would with curl : $ curl -d 'fName=Fred&sName=Bloggs' http://localhost I can get it working (without the POST parameters) if I send a simple String as the argument to the interface method, but I need to send a pojo, where each property of the pojo becomes a POST parameter. I have the following SI config

How to skip the setting of 'filter' and 'locker' attribute if custom DirectoryScanner is used in Spring Integration 4.2.0 with XML Config

三世轮回 提交于 2020-02-02 10:10:28
问题 With Spring Integration 4.2.0, it mentioned that 'filter' and 'locker' must be present if custom Scanner is being used (https://jira.spring.io/browse/INT-3619). I don't know how to set this with XML config if I simply override the listEligibleFiles() method and use the default filters provided by DefaultDirectoryScanner . e.g. // using the default filters public class MyDirectoryScanner extends DefaultDirectoryScanner { @Override protected File[] listEligibleFiles(File directory) throws

How to set payload as constructor-arg value in service-activator

大兔子大兔子 提交于 2020-01-25 16:20:32
问题 I've started with SI and kind of stuck right now as we want to use SI in one of our existing project avoiding changes where we can. A bean which we would be using as a service activator accepts an constructor argument of a java object. that object is in the payload but then I'm unable to set it using inner bean usage of service-activator <service-activator input-channel="ADMIN_TEST_CONNECTION" method="testConnection"> <beans:bean class="mypackage.request.AdminRequestProcessor"> <beans

How to set payload as constructor-arg value in service-activator

风流意气都作罢 提交于 2020-01-25 16:20:25
问题 I've started with SI and kind of stuck right now as we want to use SI in one of our existing project avoiding changes where we can. A bean which we would be using as a service activator accepts an constructor argument of a java object. that object is in the payload but then I'm unable to set it using inner bean usage of service-activator <service-activator input-channel="ADMIN_TEST_CONNECTION" method="testConnection"> <beans:bean class="mypackage.request.AdminRequestProcessor"> <beans