I have a message queue containing a customer id and some of their data. To improve performance those messages will be processed by multiple threads. My issue is that I need to find a way to ensure the message order for individual customers. To give an example, take a financial system with a queue of transacti…
Tag: rabbitmq
Synchronize all consumers of a queue to process only one message at a time
I am running a Spring Cloud Stream application, consuming messages from RabbitMq. I want to implement a behaviour where a given queue, having three consumers instances, delivers exactly one message to any of them, and wait for the next to be delivered until the current is acked (some sort of synchronization b…
@StreamListener is not visible when outside main Application class of Spring Boot. What could be the reason?
This is Spring Cloud Stream application. As i mention in the title, the StreamListener annotation works when inside the SpringBootApplication main class, but not when it resides in a different class with @Component annotation. I believe it is some sort of StreamListener visibility issue. I am publishing messa…
How to configure separately both consumer and producer spring boot app when using rabbitmq?
I watched a tutorial that explains how to integrate RabbitMQ into Spring Boot app. In the tutorial, the ReceiveMessageHandler.java (Consumer) and SendMessageController.java (Producer) classes were in the same project. I want to implement them in two different Spring Boot application. However I can’t spl…
Re-creating a queue afters its manually deleted RabbitMQ
Is it possible to automatically re-create a queue afters it has been manually removed? I’m able to create the queue on start up using However, if it’s manually removed from rabbitmq, I want to be able to create a queue with the same name automatically. Today if I remove it, I will keep throwing ex…
RabbitMQ Connection reset Exception
I have the same issue from this question: RabbitMQ Connection reset. My code is in kotlin and from https://www.rabbitmq.com/ssl.html#java-client-connecting. I have RabbitMQ configured this way: I tested this: https://www.rabbitmq.com/troubleshooting-ssl.html#sclient-connection and getting result in cmd: Rabbi…
How to create dynamic queues in rabbit mq using spring boot?
I need some help. I’m developing a spring boot application, and I want wo publish messages to a rabbitMQ. I want to send it to a queue, that is named in the message itself. This way i want to create queues dynamicly. I only found examples that use a “static” queue. I have reserched some thin…
java.lang.IllegalArgumentException when publishing a message with RabbitTemplate
I try to publish a message on a Queue with RabbitTemplate (using Spring Boot) and I got this message. I already tried to search for a solution. Maybe this part of code can help I appreciate any collaboration. Answer The problem is that your class SimpleMessage does not implement Serializable. RabbitTemplate.c…
Order of message receiving with concurrent consumers in Spring and RabbitMQ
I have following code, so I read messages from one queue and resend it, to another one. I am interested in setConcurrentConsumers(3) method does it means that three listener threads will be created? And in such case how I understood order of re-sending to queue1 and queue2 will not be met. As for me is import…
Spring Rabbit MQ listener issues
My Configuration Class is below:- The DTO is :- The Snippet for publishing the message is:- And the snippet to listen the message is:- The issue is the logs here are not coming up but if I try with The snippet below then it works:- it does goes to the logs but how to get the TestDto in that case?