Questions tagged [spring-rabbit]
Spring components for AMQP-based messaging with RabbitMQ.
1,342
questions
0
votes
1
answer
25
views
Spring Boot RabbitMQ RabbitListener ListenerExecutionFailedException
org.springframework.amqp.rabbit.support.ListenerExecutionFailedException: Failed to convert message
at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.onMessage(...
0
votes
0
answers
9
views
rabbitmq upgrade ncurses-libs-5.9-14.20130511.el7_4.x86_64 to ncurses-libs-6.1-7.20180224.el8.x86_64, beam.smp not found
i want to upgrade rabbitmq from 3.12.6 to next version
but from next version
ncurses-libs-5.9-14.20130511.el7_4.x86_64 now got updated to
ncurses-libs-6.1-7.20180224.el8.x86_64
so it is unable to find ...
0
votes
1
answer
51
views
Spring amqp RetryCache is not cleared when AmqpRejectAndDontRequeueException is thrown
I have a simple Rabbit listener which always throws AmqpRejectAndDontRequeueException (to test if listener can handle multiple invalid messages).
The config is:
@RabbitListener(
id = TestConfig....
0
votes
0
answers
39
views
Which version of RabbitMQ is Spring AMQP 3.0.10 compatible with?
We are currently using RabbitMQ version 3.11.2 . Can I safely use Spring AMQP 3.0.10 in my Spring Boot application ? I need help in understanding the compatibility matrix/ rules. Thanks.
0
votes
0
answers
17
views
Does Spring Rabbitmq StreamListenerContainer support Jackson2JsonMessageConverter
I have a producer that publish message to Rabbitmq 3.12 stream, where the producer publishing class Invoice.
In the consumer, I have this configuration.
@Configuration
public class ...
0
votes
0
answers
25
views
How to have multiple RabbitMQ queues on the same Spring listener
I've an application that works in multiple countries, they're grouped per continent (i.e: England, Portugal, France and Belgium are grouped in the EUROPE cluster), but there are some countries that ...
0
votes
0
answers
59
views
Springboot RabbitMQ low performance problem
I use rabbitmq as consumer.The procedur send to almost 200 messages per second.Size of message ~4.65KB and also the envorinment of consumers enough capacity. No matter what I do, the performance ...
0
votes
1
answer
36
views
no message available in the queue of RabbitMQ with Spring RabbitMQ of Apache camel
when I try to publish a message from a queue to another queue using Spring RabbitMQ of the Apache camel component the destination queue doesn't get any message.
@Component
public class WeatherRoute ...
0
votes
1
answer
31
views
How to correctly send and receive messages with RabbitMQ (message gets sent but not handled ?)
I set up RabitMQ in a microservices environment. I have a config file as follows:
@Configuration
public class RabbitMQConfig {
@Bean
public DirectExchange restaurantScoreExchange() {
...
0
votes
1
answer
28
views
Running multiple RabbitMQ queues sequentially
We are using Spring Boot AMQP to handle messages. We have multiple queues and some of them depend on other queues. I want to make sure that queues wait for others to complete their job. For example:
...
0
votes
1
answer
65
views
Recommended approach for Spring batch multi-threaded job that consumes from RabbitMQ
I'm working on implementing a Spring Batch job that will consume messages from a RabbitMQ queue and process their validation. Each message is an array of objects, like the example below:
[JSON object ...
0
votes
1
answer
97
views
RabbitMQ/Spring AQMP x-queue-type ignored for quorum queue definition
With a Spring AQMP Java client, I am trying to publish to an existing RabbitMQ quorum queue.
As shown in this SO answer, my code defines the target queue using the x-queue-type argument of 'quorum':
@...
0
votes
0
answers
53
views
RabbitHealthIndicator - Rabbit health check failed
I tried all of top solutions found in SO and I am still not able to make actuator/health endpoints work.
rabbithealthindicator-health-check-failed
how-to-disable-rabbit-health-check-via-configuration
...
1
vote
2
answers
325
views
Spring cloud stream with RabbitMQ binder throws java.lang.IllegalStateException: Message body is too large
I'm using spring cloud stream 4.0.4 with rabbitmq binder 4.0.4 to proccess messages in spring boot 3.1.3 app. I'm also using rabbitMQ 3.10.0. The thing is, there is an bug in my application when the ...
0
votes
0
answers
36
views
globally enable RabbitMQ quorum queues in Spring Cloud Stream
Is there any possibility to define every queue to be provisioned as a quorum queue instead of a classic queue?
spring.cloud.stream.rabbit.bindings.<channelName>.consumer.quorum.enabled=true is ...
0
votes
0
answers
102
views
Migrating RabbitMQ spring-cloud-stream from springboot 2 to springboot 3
I am updating a project that sends rabbitMQ messages from spring boot to to spring boot 3
I THINK the current springboot 2 project uses spring-cloud-stream v3.2.3 to send the messages
Here is a ...
0
votes
0
answers
16
views
Rabbit ForgivingExceptionHandler An expected connection driver occurred
Rabbit ForgivingExceptionHandler An expected connection driver occurred, underlying exception id MissedHeartbeatException: Heartbeat missing with heartbeat = 60 seconds, what causing the connection ...
0
votes
1
answer
44
views
RabbitMQ using Spring boot, should create Queue if it does not exist
I am sending data to RabbitMQ from multiple sources, if the queue does not exist, i want to create it.
public void sendMessage(String message, String routingKey) {
rabbitTemplate....
1
vote
0
answers
193
views
Spring Cloud Stream 4.0.4 Producer error Channel Enabled property not working
I am trying to understand how exactly the errorChannelEnabled property works for Spring Cloud Stream. I am using version 4.0.4 of Spring Cloud Stream and rabbit binder.
Based on this answer, I ...
0
votes
1
answer
167
views
Spring AMQP/RabbitMQ - java.net.SocketException: Connection reset by peer (Write failed)
I have a RabbitMQ server in a Kubernetes cluster that I am connecting to using Spring AMQP with default settings and RabbitTemplate class.
I have a scheduled method in a sender Spring Boot ...
0
votes
0
answers
159
views
Rabbit Mq Listner does not work after spring boot 3 upgrade
I am upgrading a component from spring boot 2.6.6 to 3.0.6 ,After upgradation my rabbit listener is not working properly as consumer. When i use it as consumer with spring boot 2.6.6 then it works ...
0
votes
1
answer
139
views
Spring Cloud Stream Rabbit error starting using ssl
I'm trying to connect with rabbitmq from aws (AmazonMQ) using Spring cloud Stream, and spring-cloud-stream-binder-rabbit using ssl, but I get an error when starting the application, I don't need to ...
0
votes
0
answers
75
views
x-delivery-count not present in dead letter queue
I created this queue using a java config in my spring boot app. I observed that once the message goes to the dead letter queue, the x-delivery-count header disappears. Is this the default behavior?
...
-1
votes
2
answers
38
views
How to retry starting Apache Camel RabbitMQ consumer router if the RabbitMQ server is temporarily unavailable
I have a simple Apache Camel route
from("spring-rabbitmq:myExchange?routingKey=foo&bridgeErrorHandler=true")
.log("From RabbitMQ: ${body}");
The sample project is ...
1
vote
0
answers
21
views
Using two separate binders for RabbitMQ spring cloud function
We are trying to use a single spring consumer function to connect to 2 different queues in 2 different rabbitmq instances.
This doesn't seem to work. The consumer function is bound to the first binder ...
0
votes
1
answer
24
views
Spring RabbitMQ Concurrency: Channels vs. Consumers vs. Concurrency
I’m trying to wrap my head around these concepts (it’d also be nice to understand Listener and ListenerContainer) especially in regards to concurrency.
So a Connection is a physical TCP connection to ...
0
votes
0
answers
120
views
Spring Boot to Zipkin Error creating bean with name 'zipkinReporter'
Please, anyone can help i'am use Spring Boot and Zipkin, here my configuration:
main class
@SpringBootApplication
public class Application extends Description {
public static void main(String[] ...
2
votes
1
answer
397
views
How to auto-declare exchange when using Camel's spring-rabbitmq component?
I'm trying to migrate from Camel 3.x to Camel 4.x version, so I need to migrate from the rabbitmq component to the replacing one spring-rabbitmq. With rabbitmq component I was using the declare option ...
0
votes
1
answer
95
views
How can I validate the queue message?
Currently I have this code:
@RabbitListener(queues = "${rabbitmq.queue}")
public void receivedMessage(TransferPayment transferPayment) {
log.info("Received message: {}", ...
1
vote
1
answer
34
views
Spring AMQP connecting to cluster with LB DNS - use single or multiple addresses?
My code will try to connect to an CloudAMQP 3-node cluster, which provides 2 flavours of DNS names:
A record that returns 3 IP addresses.
Three records that returns each of the underlying IP address.
...
0
votes
1
answer
42
views
How to add more cached channels per cached connection in CacheMode.CONNECTION Spring AMQP
I'm using CachingConnectionFactory with CacheMode.CONNECTION and i see that only one channel is opened per connection. How can i add more channel per connection?
This is config code for ...
0
votes
0
answers
164
views
Issue with rabbitMQ automatic consumer recovery during amazonMQ maintenance window
We are using the RabbitMQ cluster broker of AmazonMQ service from AWS.
Some consumers of a few queues are not able to recover or get stuck during the maintenance window.
RabbitMQ Broker engine version:...
0
votes
1
answer
543
views
How to get metrics for RabbitMQ exchanges with Spring Boot?
Spring Boot automagically (with the actuator) provides metrics for queues (spring_rabbitmq_listener*).
Is there a way to get similar metrics for the exchanges a services sends to?
The application is ...
0
votes
1
answer
208
views
spring-rabbitmq find a memory leak, but i don't know the reason, can someone help me
my application use rabbit mq, the versions are below
spring-amqp : 2.2.17.RELEASE
spring-rabbit : 2.2.17.RELEASE
spring-boot: 2.3.11.RELEASE
@Primary
@Bean(name = "...
0
votes
1
answer
54
views
How to handle /topic and /app subscription with Spring WS Stomp
I'm using Spring WS STOMP to handle server to client notifications.
I'm using an external broker: RabbitMQ.
As far as I read, Spring forwards /topic messages to broker.
By other hand /app messages are ...
0
votes
0
answers
93
views
I'm getting a connect timed out error in RabbitMQ in Socket
I'm getting a connect timed out error in RabbitMQ.
Here I am getting this error for testing purposes. I am able to establish a RabbitMQ connection. If the connection cannot be established, I am trying ...
0
votes
0
answers
26
views
How can I prevent EndpointServlet objects from being sent to SimpleMessageConverter in Spring Cloud Stream with RabbitMQ?
spring-cloud-starter-stream-rabbit 2.3.6.RELEASE
I have spam errors when my application is starting. It does not stops the app but it pushes a lot of error messages in logs.
2023-06-03 20:07:13.713 [,,...
1
vote
0
answers
218
views
Getting "c.r.c.impl.ForgivingExceptionHandler: An unexpected connection driver error occurred (Exception message: Connection reset)" in java rabbitmq
Getting "c.r.c.impl.ForgivingExceptionHandler: An unexpected connection driver error occurred (Exception message: Connection reset)" when running java project with rabbitmq
Java version - 11
...
0
votes
1
answer
201
views
what the default max length of rabbit queue
For any given queue, the maximum length (of either type) can be defined using a policy (this option is highly recommended) or by clients using the queue's optional arguments. In the case where both ...
1
vote
1
answer
212
views
Migrating Spring Cloud Connectors to java-cfenv in Cloudfoundry causes TLS failure with Rabbit-MQ service
While upgrading Spring Cloud Services from 2.4.1 to 3.5.5, we are seeing issues with the app not able to connect to Rabbit MQ service in cloud foundry. It throws the following exception:-
c.r.client....
0
votes
1
answer
99
views
Handle retryable AMQP messages with DLQ
Disclaimer!
Following code works. I would only ask about implementation correctness or other way (if exists) to solve my problem.
Definitions
some-domain-name.q.some-service.incoming-messages - this ...
0
votes
1
answer
49
views
How to mock RabbitAdmin class in JUnit
I'm trying to create a mock object for RabbitAdmin class in JUnit.
@Mock RabbitAdmin rabbitAdmin; @InjectMocks MyOriginalClass classObj;
The above is what I have declared.
Mockito.when(rabbitAdmin....
0
votes
1
answer
362
views
Spring AMQP - Publish to a Non-Existent Exchange Exception Handling
I'm attempting to account for a scenario where my Publisher publishes to a DirectExchange that doesn't exist.
According to the spring-amqp documentation, I should be able to use rabbitTemplate....
0
votes
0
answers
80
views
binding-routing-key ignored when using multiple rabbitmq binders in Spring Cloud Stream
I'm trying to connect a small Spring Cloud Stream application to two different RabbitMQ systems.
For both systems, I want to bind a stream input to an existing exchange, specifying a routing key. ...
0
votes
1
answer
158
views
Spring Cloud Stream remove x-exception-stacktrace from DLQ Message
we try to remove the "x-exception-stacktrace" from the DLQ messages to make the footprint of republish messages smaller.
We use the default spring mechanism with
spring:
cloud:
stream:
...
0
votes
1
answer
24
views
spring-rabbit - XSD lacks rabbit:listener error-handler?
Spring Rabbit has RabbitListenerErrorHandler which is configurable via Java @Configuration via @RabbitListener. Example
@RabbitListener(containerFactory="listenerContainerFactory",
...
0
votes
1
answer
61
views
When processing message long time don't work auto acknowledgement in @RabbitListner
I am using RabbitMQ to run several Spring Batch jobs. Execution takes a long time, up to 10 minutes per job. After all the work is performed, acknowledgement in @RabbitListner does not work out in ...
0
votes
1
answer
208
views
spring cloud stream rabbit custom error handler and republishToDlq not work together
I have a custom error handler and republishToDlq is true but message in dlq is a reject-ed one not a republished, missing x-exception-stacktrace etc.
I would like to use my own error handler and ...
0
votes
1
answer
118
views
Duplicated subscription identifier error with RabbitMQ and Spring Boot
I'm using STOMP over WebSocket (RabbitMQ 3.7.2 + Spring Boot 2.7.8) for server-client communications. I've recently found a lot of errors in logs:
2023-03-20 15:56:16,807 ERROR [tcp-client-scheduler-...
0
votes
0
answers
52
views
Error when add maven lib to use rabbit queue
My project built in spring-boot swagger-ui and started ok.
But now, i want to add new app used Rabbit MQ in project. And I add maven lib in pom.xml.
Source hasn't error, but when start, it raise error....