Questions tagged [spring-rabbit]
Spring components for AMQP-based messaging with RabbitMQ.
1,218
questions
0
votes
2
answers
19
views
Spring Boot + RabbitMQ: how to convert received object using convertSendAndReceive() method?
How can I deserialize a message using convertSendAndReceive() method? It gives me NullPointerException due to not being able to find the required class for deserialization in another package. Packages ...
0
votes
1
answer
16
views
Getting a strange Rabbitmq error when I start my Spring Boot server
I am trying to create a Spring Boot endpoint that consumes a message from a queue, this is my code:
@PostMapping("test")
@RabbitListener(queues = "test-queue")
public String test(@...
1
vote
1
answer
13
views
Single active consumer (SAC) - having a consumer thread consume only from a single queue
I'm trying to use single active consumer (SAC) in queues bounded to consistent hash exchange, which has 4 queues. This is for distributing the messages based on routing key and to have ordered ...
0
votes
1
answer
19
views
Declarables and MultiRabbit
I'm using spring-multirabbit library :
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
multirabbitmq:
enabled: true
connections:
my-rabbitmq:
...
0
votes
1
answer
21
views
How to change Spring AMQP protocol version from 0.9.1 to 1.0?
I am a beginner to the Spring AMQP and I trying to understand what version of the AMQP protocol it uses, and how to change it.
AFAIK there are 2 variations of the AMQP protocol
0.9.1
1.0
So how do I ...
0
votes
1
answer
26
views
How to create instance specific message queues in springboot rest api
I have a number of microservices, each running in its own container in a load balanced environment. I have a need for each instance of these microservices to create a rabbitmq queue when it starts up ...
0
votes
1
answer
41
views
Connect to to different rabbitmq servers and queues at run time in spring boot
I have to create an application that is supposed to connect and consume messages from multiple RabbitMQ hosted in different locations with different ip, port, user, pwd, etc. I must be able to add and ...
0
votes
1
answer
19
views
Order in which RabbitMQ concurrent listeners listen to the same queue
I have a @RabbitListener that listens to a container of queues.
@RabbitListener(id = CONTAINER_ID, concurrency = "100")
public void instrumentListener(String payload) {
// do some action
}...
0
votes
1
answer
39
views
Wait 10 seconds after send command in RabbitListener
I have my RabbitListener witch received results of calculations. This is the lot of data so i batched it and next send a command to axon commandGateway. I wonder if it is possible for the listener to ...
0
votes
1
answer
19
views
Create and cleanup instance specific rabbitMQ instances
I have a set of microservices using springboot rest. These microservices will be deployed in a autoscaled and load balanced environment. One of these services is responsible for managing the system'...
0
votes
1
answer
31
views
RabbitMQ channel.addConfirmListener() , interface ackCallback Some callbacks are missing?
This is my code, channel.addConfirmListener() ackCallback Some callbacks will be lost, The message is indeed sent to the rabbitmq server and can be consumed normally , But I sleep for 2ms after ...
0
votes
1
answer
25
views
Spring amqp recovery mechanism
I have read the doc which says
Spring AMQP now uses the 4.0.x version of amqp-client, which has auto recovery enabled by default.
Is spring amqp's auto recovery mechanism exactly same as the native ...
0
votes
1
answer
67
views
Spring AMQP reconnection issue with rabbitmq cluster due to queue checking retry limit
I have a rabbitmq cluster with 3 nodes. One node has a durable and non-mirrored classic queue named test-queue.
I have a spring boot app using spring-AMQP default connection factory new ...
0
votes
0
answers
20
views
How to perform operation when a message is sent to dead letter queue because of expiration?
I have a requirement where I want to perform some operation with the message (like sending the message to the support team or logging the message in the console) when a message expires and is sent to ...
1
vote
0
answers
21
views
Spring Sending Message RAbbitMQ Rollback
Hi I use spring rabbit to send message to rabbitmq.
I want to rollback sending message how can I do that ,my goal is to achive that in writing process.
Can anyone share code sample
0
votes
0
answers
29
views
RabbitMQ Shovel Plugin Header based
I have a requirement to publish message to different queues based on header and that too can be on different cluster or vhost.
My preference is to have a direct exchange which will be binded to a ...
0
votes
1
answer
41
views
RetryInterceptorBuilder doesn't seem to work
I'm trying to use Spring capabilities to handle retries. My ListenerContainer is defined like this:
@Bean("myListenerContainer")
public SimpleMessageListenerContainer statusCheckcontainer(...
0
votes
1
answer
70
views
Rabbit MQ message deduplication
Thanks for the forum replies and sharing.
Im looking for deduplication settings from rabbit mq side. Is it in the queue side or exchange side ?
Do we have a steps to configure **rabbit mq or queue or ...
0
votes
1
answer
44
views
Is it possible to get a list of service that dynamically get down on my application that is on spring boot
My application contains rabbitmq,hazelcast,dynamodb,elastic I want build a mechanism that can tell me whenever any of my application get down I should be notified on an email.Can we include any ...
0
votes
1
answer
53
views
Distributing Single Active Consumers across microservice instances
Background
We have a need for messages to be processed in the order they were published. This is necessary to make sure all updates related to a particular entity are applied in order. Example: User ...
0
votes
1
answer
99
views
Spring AMQP: remove old bindings and queues
I’m using Spring AMQP and Spring Boot @Configuration and @Bean annotations in order to create all required queues, exchanges and bindings.
@Bean
public Queue queue() {
return new Queue("...
0
votes
1
answer
83
views
Customize RabbitMQ message deserialization in Spring Boot
I have a hierarchy of messages. The topmost message in the hierarchy is defined with @JsonTypeInfo and @JsonSubTypes. The class is not under my control. I extended the hierarchy with my own message ...
0
votes
1
answer
42
views
Using Topics and Acknowledgment with RabbitMq
I have been trying to use RabbitMq instead of using Kafka. I am a beginner for using RabbitMq. How can I change this KafkaListener event to RabbitMQListener?
I have been trying to find out, but I ...
0
votes
2
answers
64
views
Rabbitmq :: Message is never removed from stream queue
I have created an stream queue in the rabbitmq of my project and configured max-age to 1 minute. I sent a message to the queue,all the consumers consumed the message, but the message is remaining in ...
0
votes
1
answer
93
views
Memory leak outgoing messages rabbitmq
I have a Spring Boot application that is using Spring Integration. And I have problem with increasing memory over time. When I run profiler I can see problem in outbound endpoint when it seems like ...
0
votes
1
answer
27
views
Which component is creating null-consumerMonitor-# threads?
Recently we started to test the Direct Container Factory in one of our microservices, the main motivation to change container factory is we want to reduce the thread number that process messages from ...
0
votes
0
answers
81
views
spring cloud stream consumer exchange connection retry
I have rabbitmq consumer with reactive spring cloud stream
@Bean
public <T> Consumer<Flux<Message<Subscription>>> exportConsumer() {
return new ExportSubscriptionConsumer&...
1
vote
1
answer
108
views
RabbitMQ how to only have one message at a time and don't requeue on failure
Our system has a bunch of consumers that use rabbit to consume messages for long running tasks. Currently we ack at the end of processing, so that if the consumer crashes, the message gets requeued. ...
1
vote
1
answer
308
views
Spring Cloud Stream connect to multiple hosts for single binder (RabbitMQ)
we are using Spring Cloud Stream to listen to rabbitMQ multiple queues, especially the SCF model
The spring-cloud-stream-reactive module is deprecated in favor of native support via Spring Cloud ...
0
votes
1
answer
53
views
RabbitListener to retry only for a particular exception
How do I make my RabbitListener retry only when there is an exception while consuming the message and not for any other exception? In other words, I want the listener to retry only for a particular ...
0
votes
1
answer
36
views
High number of socket descriptor in rmq
We recently had an issue in our rabbitmq server , where it was unable to accept new connections and dropping those TCP connections .
we didn’t saw any spike in our channels or consumers .
Socket ...
0
votes
1
answer
75
views
Injecting scoped beans in the context of one AMQP message in Spring Boot
When writing web application with Spring Boot you can declare your beans to be part of the session- or request scope.
Is it possible to create a scope for injection of data with messages received by a ...
0
votes
1
answer
30
views
What is idea of bindings in spring boot rabbitmq?
I need to bind several exchanges with several routing keys to one single queue and be able to send messages by exchange and routing key and receive it by listening to queue by queue-name.
my code:
@...
0
votes
1
answer
243
views
Java - Is it Possible to Use Spring Cloud Stream Kafka and RabbitMQ for the Same Application
We have an application that is already using Spring Cloud Stream with RabbitMQ, some endpoints of the application are sending messages to Rabbit MQ. Now we want new endpoints start sending messages to ...
0
votes
0
answers
94
views
Error creating bean with name 'refreshEventListener': Singleton bean creation not allowed while singletons of this factory are in destruction
When trying to start a RabbitMQ queue i'm getting an error message like the following:
Error creating bean with name 'refreshEventListener': Singleton bean creation not allowed while singletons of ...
1
vote
0
answers
137
views
RabbitMQ Consumers disappear due to SocketTimeoutException
After the SocketTimeoutException the consumers from the queue disappear and they don't come back. The messages in the queue are not lost. Using spring configurations:
spring.rabbitmq....
1
vote
1
answer
50
views
Can Spring Boot be configured to act as both client and server (mesh topology) with RabbitMQ RPC?
I have 2 apps developed with spring boot:
App1:
exposes an API for app2, for example /api/members
makes a call to app2 in order to retrieve weather details, for example /api/weather
App2:
exposes ...
0
votes
0
answers
110
views
Error trying to start spring boot application in tomcat under linux
I'm developing a rest api for route optimization (solving a vehicle routing problem). My solution involves an api rest interface component for managing requests and authentication and a route procesor ...
0
votes
0
answers
53
views
Message not getting published on Queue after upgrading spring boot
Updated the spring boot version from 2.1.4.RELEASE to 2.2.6 RELEASE, and getting the below logs when publishing a message on RabbitMq.
2022-01-20 22:21:35.165 ERROR 6431 --- [ 127.0.0.1:5673] o.s.a.r....
1
vote
0
answers
214
views
RabbitMQ channel error no exchange found with name 'examplename' in vhost'/'
I've been working on a school project with some classmates and we need to use rabbitmq for messaging between microservices. Me and my classmate have the same code (up to date both pulled from a github ...
0
votes
0
answers
36
views
org.springframework.amqp.AmqpResourceNotAvailableException: The channelMax limit is reached. Try later
I am setting up Rabbit template for messaging in my gradle SpringBoot Application. I wrote integration tests for each endpoint that uses rabbit template. I see some tests pass while other tests fail ...
0
votes
1
answer
96
views
How to change message type detection strategy?
I’m using a custom RabbitMQ client in application A and Spring Amqp Library in application B.
I’ve faced with a problem: How to decide witch @RabbitListener to use for different message types?
Problem:...
0
votes
1
answer
78
views
SQS FIFO like using RAbbitMQ
is there a way to implement a FIFO queue based on key (like SQS message group ID) using RabbitMQ?
I have a system with multiple consumers that processes messages from the same group sequentially, this ...
1
vote
0
answers
43
views
Eventual RabbitMQ crash
I would like to understand the logs of a RabbitMQ error. Can anyone help me decipher the following error message:
The interesting thing is that in my case, I have a server running with RabbitMQ 3.8.8 ...
0
votes
1
answer
45
views
Rabbit listener method is not getting invoked with the incoming message
I have a method to consume messages in similar line as shown below:
@RabbitListener(queues = "${com.rabbimq.myQueue}")
public void receive(String msg, Channel channel, @Header(AmqpHeaders....
1
vote
0
answers
76
views
Spring Boot RabbitMQ access refused for user
I've got two Spring Boot based application, one is producer which obtain data from external services and sends it to Rabbit, the second one is consumer which gets data from Rabbit and process it.
I'm ...
0
votes
1
answer
77
views
How to Add an Around Advice to RabbitListener
Asked and answered in reponse to Set MDC properties only for rabbitmq events
0
votes
2
answers
276
views
spring-jms - listener exchange and bind queue by jms configuration
I have a project with spring-jms
I'm trying work with exchanges. I created 4 listeners and all of them are been bound into exchange named 'jms.durable.queues' by default. Even thought I create my own ...
0
votes
1
answer
234
views
How many consumers can i have? (Spring-boot + RabbitMq)
I'm using Spring Boot with RabbitMq, and a question came up, is there a limited number of consumers I can create?
Where do I find this value?
0
votes
1
answer
292
views
RabbitMQ CachingConnectionFactory and publisherReturns configuration
A continuation of Make Spring RabbitMQ fail on missing exchange
I register MessageListenerContainer for multiple queues.
Where and how should I configure channel returnListener? - I thing the way I ...