spring-rabbitmq

How to set x-dead-letter-exchange in Rabbit?

假装没事ソ 提交于 2020-07-10 10:25:21
问题 Here are my beans: @Bean public Queue igSmev3ListenerQueue() { Map<String, Object> args = new HashMap<>(); args.put("x-dead-letter-exchange", rabbitIgSmev3DlxProperties.getExchangeName()); args.put("x-dead-letter-routing-key", rabbitIgSmev3DlxProperties.getRoutingKey()); return new Queue(rabbitIgSmev3ListenerProperties.getQueueName(), true, false, false, args); } @Bean public Queue igSmev3DlxQueue() { return new Queue(rabbitIgSmev3DlxProperties.getQueueName(), true, false, false); } Here are

Getting errors while providing rabbitMQ configuration in spring boot application

╄→尐↘猪︶ㄣ 提交于 2020-06-17 09:08:28
问题 Error : java.lang.NoClassDefFoundError: org/springframework/amqp/support/converter/MessageConverter at java.lang.Class.getDeclaredMethods0(Native Method) RabbitConfig.java package com.example.demo; import org.springframework.amqp.core.*; import org.springframework.amqp.rabbit.connection.CachingConnectionFactory; import org.springframework.amqp.rabbit.connection.ConnectionFactory; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.amqp.support.converter

Caused by: java.lang.ClassNotFoundException: org.springframework.integration.dsl.IntegrationFlowBuilder

房东的猫 提交于 2020-04-30 06:56:08
问题 I'm working on Spring Cloud Stream using RabbitMQ using Spring Boot v2.2.6.RELEASE . Error: java.lang.IllegalStateException: Error processing condition on org.springframework.cloud.stream.config.BindingServiceConfiguration at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60) ~[spring-boot-autoconfigure-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~

multiple Rabbitmq queues with spring boot

陌路散爱 提交于 2020-02-18 10:25:38
问题 From spring boot tutorial: https://spring.io/guides/gs/messaging-rabbitmq/ They give an example of creating 1 queue and 1 queue only, but, what if I want to be able to create more then 1 queue? how would it be possible? Obviously, I can't just create the same bean twice: @Bean Queue queue() { return new Queue(queueNameAAA, false); } @Bean Queue queue() { return new Queue(queueNameBBB, false); } You can't create the same bean twice, it will make ambiguous. 回答1: Give the bean definition factory

multiple Rabbitmq queues with spring boot

不羁岁月 提交于 2020-02-18 10:22:40
问题 From spring boot tutorial: https://spring.io/guides/gs/messaging-rabbitmq/ They give an example of creating 1 queue and 1 queue only, but, what if I want to be able to create more then 1 queue? how would it be possible? Obviously, I can't just create the same bean twice: @Bean Queue queue() { return new Queue(queueNameAAA, false); } @Bean Queue queue() { return new Queue(queueNameBBB, false); } You can't create the same bean twice, it will make ambiguous. 回答1: Give the bean definition factory

Proper use of SpringRabbit DirectMessageListenerContainer and setConsumersPerQueue property

﹥>﹥吖頭↗ 提交于 2020-02-06 08:08:55
问题 I use the DirectMessageListenerContainer to listen to individual queues, since it creates a consumer per queue , preventing queue starvation if a messages on say "queue1" take a while to process, while the one on "queue2" are quick to process. I am confused about the DirectMessageListenerContainer.setConsumersPerQueue method. The default value is 1 looking at the source code. Under what conditions would one need to increase it to greater than 1? If left to default value of 1, is the

Proper use of SpringRabbit DirectMessageListenerContainer and setConsumersPerQueue property

限于喜欢 提交于 2020-02-06 08:08:33
问题 I use the DirectMessageListenerContainer to listen to individual queues, since it creates a consumer per queue , preventing queue starvation if a messages on say "queue1" take a while to process, while the one on "queue2" are quick to process. I am confused about the DirectMessageListenerContainer.setConsumersPerQueue method. The default value is 1 looking at the source code. Under what conditions would one need to increase it to greater than 1? If left to default value of 1, is the

Spring RabbitTemplate- How to get hold of the published message for NACKs in Publisher confirm mode

自闭症网瘾萝莉.ら 提交于 2020-02-04 02:34:22
问题 I have a web-app that posts messages on RabbitQueue using spring. I have turned on Publisher confirms and returns enabled and I'm using spring rabbit:template. This is my configuration: <rabbit:template id="amqpTemplate" connection-factory="amqpConnectionFactory" retry-template="retryTemplate" confirm-callback="messagesConfirmCallback" return-callback="messagesReturnCallback" exchange="${rabbitmq.rest.exchange}" routing-key="key.listener" mandatory="true" /> <rabbit:connection-factory id=

Cannot enable /monitor endpoint for spring-cloud-bus for push notifications

拈花ヽ惹草 提交于 2020-01-17 03:34:14
问题 I have configured spring cloud config to read properties from a git repository.With the current implementation if there is a change in the configuration, if post to /refresh on my client I am able to see the updated properties. Now, I would like to use the spring-cloud-bus-monitor to detect changes in my git repo and automatically refresh the properties in my client endpoints. Even after adding spring-cloud-config-monitor in the dependencies - the /monitor endpoint is not enabled, and