spring-amqp

Re-creating the queue and re-connecting to rabbitMQ

限于喜欢 提交于 2020-01-04 06:10:09
问题 Components Involved : Spring Config-server, Spring AMQP (RabbitMQ), Spring Config-client Goal : Use push notification to inform config-client to refresh config. RabbitMQ instance : From docker hub, I pulled rabbitmq:3-management image and ran. Config-client AMQP version pom.xml: <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-bus-amqp</artifactId> <version>1.3.1.RELEASE</version> </dependency> Config-server pom.xml: <dependency> <groupId>org

Re-creating the queue and re-connecting to rabbitMQ

末鹿安然 提交于 2020-01-04 06:07:10
问题 Components Involved : Spring Config-server, Spring AMQP (RabbitMQ), Spring Config-client Goal : Use push notification to inform config-client to refresh config. RabbitMQ instance : From docker hub, I pulled rabbitmq:3-management image and ran. Config-client AMQP version pom.xml: <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-bus-amqp</artifactId> <version>1.3.1.RELEASE</version> </dependency> Config-server pom.xml: <dependency> <groupId>org

Is there any option to set AutomaticRecoveryEnabled in RabbitMQ using Spring-AMQP?

蹲街弑〆低调 提交于 2020-01-04 02:45:14
问题 Getting stocked while doing with RabbitMQ using Spring-AMQP. Just need to get a way to configure AutomaticRecoveryEnabled and NetworkRecoveryInterval using Spring-AMQP. There is a direct option to set these flages if you you developing using native RabbitMQ library. But i didn't find a workaround to do the same using spring Using RabbitMQ Native library(don't need any help) factory.setAutomaticRecoveryEnabled(true); factory.setNetworkRecoveryInterval(10000); Using Spring-AMPQ(need help) Like

Spring RabbitTemplate - How to create queues automatically upon send

孤街醉人 提交于 2020-01-03 10:54:40
问题 I am using RabbitMQ together with Spring's RabbitTemplate. When sending messages to queues using the template send methods, I want the queue to automatically be created/declared if it is not already exists. It is very important since according to our business logic queue names are generated on run-time and I cannot declare them in advance. Previously we have used JmsTemplate and any call to send or receive automatically created the queue. 回答1: Yes, you can use a RabbitAdmin and admin

Spring RabbitTemplate - How to create queues automatically upon send

只愿长相守 提交于 2020-01-03 10:52:47
问题 I am using RabbitMQ together with Spring's RabbitTemplate. When sending messages to queues using the template send methods, I want the queue to automatically be created/declared if it is not already exists. It is very important since according to our business logic queue names are generated on run-time and I cannot declare them in advance. Previously we have used JmsTemplate and any call to send or receive automatically created the queue. 回答1: Yes, you can use a RabbitAdmin and admin

SpringBoot Disable rabbitTemplate retry policy for rabbit health check

你。 提交于 2020-01-01 19:37:33
问题 My SpringBoot configuration contains very strong retry policy for rabbitTemplate retries spring: rabbitmq: template: retry: enabled: true initial-interval: 500 max-attempts: 10 multiplier: 5 max-interval: 60000 The problem with this configuration is when health endpoint is called and rabbitMQ is down, the connections hangs for really long time. Adding properties like spring.rabbitmq.connection-timeout=500 or spring.rabbitmq.template.receive-timeout=500 or spring.rabbitmq.template.reply

Sending acknowledgment to rabbitmq server in depends on converter and listener

这一生的挚爱 提交于 2019-12-31 05:57:31
问题 First of all, I present context of my case: I am using spring-boot and spring-rabbitmq . It is working for me, you should know that I must have implemented custom converter for received messages. (1) From this converter can be thrown exception, for instance in case of inproper message and so on. (2) After successfull converting (no exception) listener is invoked. Then, in the listener it can also be thrown exception. Now, I would like to force two things: (1') Don't requeue message in case of

spring amqp-outbound gateway to produce reply from a different thead (Like jms-outbound gateway)

本秂侑毒 提交于 2019-12-31 05:56:41
问题 Problem statement: Spring amqp-outbound gateway to produce reply from a different thread (Like jms-outbound gateway, having different queue, correlate the request/response using correlation key). Unable to correlate the message with this example. Spring integration <int:gateway id="outboundGateway" service-interface="com.amqp.outbound.gateway.OutboundGateway" default-reply-channel="defaultReplyChannel" > <int:method name="process" request-channel="inboundRequestChannel"/> </int:gateway> <int

spring amqp-outbound gateway to produce reply from a different thead (Like jms-outbound gateway)

老子叫甜甜 提交于 2019-12-31 05:56:08
问题 Problem statement: Spring amqp-outbound gateway to produce reply from a different thread (Like jms-outbound gateway, having different queue, correlate the request/response using correlation key). Unable to correlate the message with this example. Spring integration <int:gateway id="outboundGateway" service-interface="com.amqp.outbound.gateway.OutboundGateway" default-reply-channel="defaultReplyChannel" > <int:method name="process" request-channel="inboundRequestChannel"/> </int:gateway> <int

Spring Amqp has NoClassDefFoundError in springframework RetryCallback class

一笑奈何 提交于 2019-12-31 03:54:06
问题 I have been working on a distributed web project and I want to utilize Spring amqp using RabbitMq in it. I use springFramework version 4.1.6 in my project. To do this, I have added the following dependencies to the file pom.xml. <dependency> <groupId>com.rabbitmq</groupId> <artifactId>amqp-client</artifactId> <version>3.5.7</version> </dependency> <dependency> <groupId>org.springframework.amqp</groupId> <artifactId>spring-amqp</artifactId> <version>1.5.3.RELEASE</version> </dependency>