spring-integration-amqp

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

Spring Integration: get all headers involved in an aggration and not just the last one

℡╲_俬逩灬. 提交于 2020-01-14 04:21:06
问题 I have a Spring integration flow defined like this: IntegrationFlows.from(Amqp.inboundAdapter(connectionFactory, "queueName") .id("id") .acknowledgeMode(MANUAL) .autoStartup(autoStartup) .concurrentConsumers(2) .maxConcurrentConsumers(3) .messageConverter(messageConverter())) .aggregate(a -> ...) .handle(serviceActivatorBean, "myMethod", e -> e.advice(requestHandlerRetryAdviceForIntegrationFlow())) .get(); And a service activator defined like this: @Component @Transactional public class

How can @MessagingGateway be configured with Spring Cloud Stream MessageChannels?

烂漫一生 提交于 2019-12-18 06:23:10
问题 I have developed asynchronous Spring Cloud Stream services, and I am trying to develop an edge service that uses @MessagingGateway to provide synchronous access to services that are async by nature. I am currently getting the following stack trace: Caused by: org.springframework.messaging.core.DestinationResolutionException: no output-channel or replyChannel header available at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler

Don't ack RabbitMQ messages until IntegrationFlow service activator method returns succesfully?

喜夏-厌秋 提交于 2019-12-13 03:19:43
问题 I have an integration flow defined like this: IntegrationFlows.from(Amqp.inboundAdapter(connectionFactory, "queueName") .id("id") .autoStartup(autoStartup) .concurrentConsumers(2) .maxConcurrentConsumers(3) .messageConverter(messageConverter())) .aggregate(a -> ...) .handle(serviceActivatorBean, "myMethod", e -> e.advice(requestHandlerRetryAdviceForIntegrationFlow())) .get(); Where the serviceActivatorBean is defined like this: @Component @Transactional public class ServiceActivator {

SimpleMessageListenerContainer shutdowntimeout

别等时光非礼了梦想. 提交于 2019-12-11 04:29:08
问题 I am using spring-rabbit-1.7.3.RELEASE.jar I have defined a SimpleMessageListenerContainer in my xml with shutdownTimeout parameter. bean id="aContainer" class="org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer"> <property name="connectionFactory" ref="rabbitConnectionFactory" /> <property name="queueNames" value="aQueue" /> <property name="adviceChain" ref="retryAdvice" /> <property name="acknowledgeMode" value="AUTO" /> <property name="shutdownTimeout" value="900000" /

Spring Cloud Stream and RabbitMQ health check

半世苍凉 提交于 2019-12-10 16:59:44
问题 I have a simple Spring Boot application using Spring Cloud Stream Rabbit and Eureka Discovery Client. The application works fine together with Eureka Server, and the messaging over RabbitMQ is also working. But if I spin up a Spring Boot Admin Server, the application starts logging health check failures: 2017-06-21 19:47:57.352 INFO 11416 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 2017-06-21 19:51:25.047 INFO 11416 --- [nio-8303

How can @MessagingGateway be configured with Spring Cloud Stream MessageChannels?

妖精的绣舞 提交于 2019-11-29 10:52:00
I have developed asynchronous Spring Cloud Stream services, and I am trying to develop an edge service that uses @MessagingGateway to provide synchronous access to services that are async by nature. I am currently getting the following stack trace: Caused by: org.springframework.messaging.core.DestinationResolutionException: no output-channel or replyChannel header available at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:355) at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput