spring-integration

Spring Integration Java DSL using JMS retry/redlivery

自古美人都是妖i 提交于 2019-12-25 02:22:06
问题 How can I effectively support JMS redelivery when msg handling throws an exception? I have a flow using JMS (ActiveMQ) with a connectionFactory that is configured to allow n redelivery attempts. I would like to have any error that occurs while handling the msg cause the msg to get put back for redelivery as many times as the connectionFactory config allows and then when max redelivery attempts are exhausted, deliver to DLQ. per usual with AMQ. An answer to a related SO question implies that I

TcpReceivingChannelAdapter vs TcpSendingMessageHandler

偶尔善良 提交于 2019-12-25 01:22:09
问题 Why channel can be set on TcpReceivingChannelAdapter , the inbound adapter, but not on TcpSendingMessageHandler , the outbound adapter? Why outbound adapter is called TcpSendingMessageHandler, why handler , not adapter? One would intuitively expects that inbound adapter and outbound adapter would be "mirrors" of each other, just with different directions. My question is variation of Spring Integration - Inbound vs Outbound Channel Adapters question, but focused on Spring Integration DSL API

Task executor Spring integration - Subsequent service activators are executed as a part of the pool

∥☆過路亽.° 提交于 2019-12-25 00:39:14
问题 I am wrting a spring application where I am using 2 task executors. So structure of my code is as below <!-- Web gatherer Configuration --> <int:channel id="web-gatherer-channel"> <int:queue capacity="10"/> </int:channel> <task:executor id="webGathererExecutor" pool-size="10" queue-capacity="10"/> <int:service-activator input-channel="web-gatherer-channel" ref="webGatherer" method="getData" output-channel="aggregator-router-channel"> <int:poller task-executor="webGathererExecutor" fixed-delay

@SpringIntegrationTest annotation does not load context as expected

為{幸葍}努か 提交于 2019-12-25 00:33:11
问题 Normally, when I use @SpringBootTest I get the full context of beans. I can the @Autowire all kinds of beans that are available after the application has started. Now, in the scope of spring-integration-test libary, the @SpringIntegrationTest does not do this. As the testing module promises, you can use @Autowired private MockIntegrationContext mockIntegrationContext; However, after inspecting the bean map on that instance, I found out there are no beans! Example test: @ActiveProfiles("test")

Spring Integration redelivery via errorChannel throw with JmsTransactionManager doesnt honor maximumRedeliveries

安稳与你 提交于 2019-12-25 00:14:00
问题 Related to SO question: Spring Integration Java DSL using JMS retry/redlivery Using a transacted poller and JmsTransactionManager on a connectionFactory with maximumRedeliveries set to 3 results in a doubling of the actual redlievery attempts. How can I get this to honor the redelivery settings of the connection factory? My connectionFactory is built as: @Bean (name="spring-int-connection-factory") ActiveMQConnectionFactory jmsConnectionFactory(){ return buildConnectionFactory( brokerUrl,

How to make TCP client which send request and receive response .Also accepts the messages pushed from server

为君一笑 提交于 2019-12-25 00:13:35
问题 I have to create a tcp client 1)-which will send request msg to server and receive response for it 2)- Some time the server push msg to the client without any request from clientSo client should accept and read it . So I have already asked the question for the 1 part of it My tcp client using spring integration not able to get response and tried to reach some solution .But for second part i am confused what to use tcpoutbound gateway or inboundgateway with client flag enable. Kindly suggest

resequencer with holes on secuence

▼魔方 西西 提交于 2019-12-24 22:59:02
问题 we have an ETL scenario where we use the resequencer. Messages arrive to the flow with a sequence number that the resequencer uses it to send messages in order, but sometimes messages are discarded previously (because of data validation) and do not arrive to the resequencer. This produces holes in the sequence and resequencer stops sending messages using the default release strategy. To avoid this, we developed a new SequenceTimeoutReleaseStrategy that is a mix between default strategy and

Spring Integration: Getting Exception on refreshing application context 2nd time

喜欢而已 提交于 2019-12-24 21:54:53
问题 I am refreshing the application context in a spring integration project which consists of various gateways and service activators. Refreshing works fine for the first time, but getting this exception on subsequent refreshes (done after considerable intervals). Controller: @RequestMapping(value = "/contextReload", method = RequestMethod.GET) public String contextReload() throws Exception { LOG.info(" Reloading Application Context"); refreshAsync(); return "responseOK"; } private void

Can not send response for UDP message

回眸只為那壹抹淺笑 提交于 2019-12-24 20:46:51
问题 I am trying to send message with: netcat -u localhost 11111abcd I just need that the client get answer: OK It get the message and try to answer with OK. But it writes this infinitely to application log: Message: GenericMessage [payload=byte[2], headers={ip_packetAddress=127.0.0.1/127.0.0.1:49489, ip_address=127.0.0.1, id=8db6aa3b-b56b-6dce-9554-c7b0ce050142, ip_port=49489, ip_hostname=127.0.0.1, timestamp=1494442285767}] Message Payload: OK Config: <?xml version="1.0" encoding="UTF-8"?>

How to catch errors from the Spring Integration error channel inside Spring Cloud Stream?

假装没事ソ 提交于 2019-12-24 20:29:22
问题 I'm trying to create a application-level error handler for failures during the processing inside SCS application using Kafka as a message broker. I know that SCS already provides the DLQ functionality, but in my case I want to wrap failed messages with a custom wrapper type (providing the failure context (source, cause etc.)) In https://github.com/qabbasi/Spring-Cloud-Stream-DLQ-Error-Handling you can see two approaches for this scenario: one is using SCS and the other one directly Spring