Questions tagged [spring-amqp]
Spring components for AMQP-based messaging.
1,619
questions
0
votes
1
answer
59
views
How to implement ConnectionFactory#setMaxInboundMessageBodySize in SpringBoot 2.7.15?
I am trying to increase the body-size limit of the inbonund amqp-messages.
I have a Cloud-Foundry Springboot 2.7.15 application.
My class currently looks like this:
@Configuration
public class ...
0
votes
1
answer
57
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....
1
vote
0
answers
47
views
RabbitMQ cannot bind JMS exchange to queue
I face an odd issue when I bind an x-jms-topic exchange to a queue using the JMS plugin rabbitmq_jms_topic_exchange as RabbitMQ is not a JMS provider. I face the issue that neither the UI nor the ...
0
votes
0
answers
40
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
18
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
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
0
answers
47
views
The channelMax limit is reached
Dependencies:
spring-boot-starter-amqp:3.1.1
I am currently using AsyncRabbitTemplate and it keeps opening a new channel. The problem is that there are more channels being created and the idle ...
0
votes
1
answer
29
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
0
answers
13
views
Best practice to manage Queue policies in Spring-amqp project
I have an application that includes a RabbitMq Admin module to automatically manage the RMQ depending on the application state.
Until now I have used x-arguments approach to manage parameters (such as ...
0
votes
0
answers
52
views
RabbitTemplate.sendAndReceive() method doesn't read message properties
When I use this code messageProperties doesn't apply in reply message
public class RabbitHelper {
@Autowired
private RabbitTemplate rabbitTemplate;
public Message sendAndReceiveMessage() {...
0
votes
0
answers
57
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
345
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
1
answer
101
views
Spring Boot RabbitMQ Pub/Sub Model with Queue creation/subscriptions at runtime and container scaling
I have a Spring Boot application with a basic WebSocketConfigurer. At a high level, for each established connection, I want that websocket session to "subscribe" to a "channel" ...
0
votes
1
answer
23
views
How to automatically restore Exchanges in Rabbitmq after it is deleted unexpected
How to automatically restore Exchanges in Rabbitmq after it is deleted unexpected(from client).
I'm using spring amqp in my project, but i don't know how to active this feature, i can't even catch a ...
0
votes
1
answer
33
views
Listener goes into infinite retries when using multirabbit connection
I'm using spring-multirabbit to configure connections to 2 separate rabbitmq servers.
spring:
multirabbitmq:
enabled: true
defaultConnection: first-connection
connections:
first-...
0
votes
1
answer
189
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
32
views
spring-boot-starter-amqp dependency cause CglibAopProxy throws AmqpException while calling CachingConnectionFactory.createConnection()
I'm trying to embed rabbitmq in a spring boot application. I followed various tutorials on the internet.
The spring boot version used is V2.7.14. I do have in my POM the spring-boot-starter-amqp ...
1
vote
1
answer
74
views
how can I generate message queue and binding keys dynamically with PK value in SpringBoot AMQP
I want to implement a feature where users belonging to a specific group can post something within the group, and all members of the group will receive notifications.
To achieve this, I studied AMQP ...
0
votes
1
answer
37
views
Listen to RabbitMQ, receive a message from queue 1, do processing and publish message to queue 2 - possible in one Spring AMQP transaction?
It's not clear from Spring AMQP documentation on transactions if it's possible to do everything in one transaction: listen to RabbitMQ, receive a message from queue 1, do processing (including ...
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
311
views
RabbitMQ Single Active Consumer losing message order on consumer shutdown
Sample with Replicate steps found here.
Problem Definition:
We have a typical publisher - consumer setup where we require consumption of messages to be done sequentially and in order. Our goal is to ...
0
votes
0
answers
171
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
28
views
Trying to deactivate the automatic registration of RabbitListener instances so I can manually register my own
I am upgrading my Spring project from Spring 1.x up to (hopefully) 3.x. That said, I have just finished upgrading everything to 2.0.9 and now tried bumping to 2.1.18. There is an issue I am facing ...
1
vote
0
answers
192
views
How to configure JMS container factory to retry with backoff and not retry MessageConversionException
I'm having two problems while using JMS:
I created an instance of ExponentialBackOffWithMaxRetries and added to my DefaultJmsListenerContainerFactory in the method .setBackOff but it doesnt seem to ...
0
votes
2
answers
230
views
Spring Boot AMQP retry on exception behavior
I am using org.springframework.boot:spring-boot-starter-amqp:3.0.5 to consume messages from RabbitMQ queue.
I set up a DLQ for my queue, so when my listener throws AmqpRejectAndDontRequeueException ...
0
votes
1
answer
102
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
0
answers
84
views
spring-rabbitmq does not respect replyTimeout for InOut Exchanges
I think I found a bug in the spring-rabbitmq component. It seems that the replyTimeout settings (neither path nor spring properties) will be accepted by the component. I have create a sample project ...
0
votes
0
answers
191
views
Spring amqp's RabbitConnectionFactoryBean cannot connect over TLS to inbound while it works to outbound
I am struggling with my attemps to establish an AMQP over TLS connection within a messaging brigde.
The odd thing is that it works perfectly well when I perform an outbound connection... but fails ...
1
vote
1
answer
90
views
How to get Spring AMQP Message from Advice
I have 2 services Producer and Consumer.
In the service Consumer I have multiple places using SecurityContextHolder to get the current user.
Then I want to pass a User Id from Producer to Consumer ...
0
votes
1
answer
345
views
dead letter queue not getting message after retry completed
After retry limit reached message is not pushed to DLQ. Also my message in main queue is also removed getting empty logs after retry done. But retry is happening for the specified limit. After retry ...
0
votes
1
answer
177
views
How to use kotlinx serialization with Spring AMQP?
It seems that spring AMQP has built-in MessageConverter support for Jackson with the Jackson2JsonMessageConverter class, but is there an equivalent for the kotlinx serialization lib, or would it be ...
0
votes
0
answers
136
views
Why is my AmqpRejectAndDontRequeueException not being respected?
I have a spring boot service method as shown below. This receives a rabbit message and does some things. The problem is its attempting to consume the same message over and over again even if it throws ...
0
votes
1
answer
365
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
1
answer
179
views
Rabbit Mq Not Consuming Messages after first message
After posting message in queue, receiveing same message twice at the lisitener side.
After receving the first message listner stops consuming furthe message . After i restart the listener application ...
0
votes
1
answer
275
views
How do I detect that a RabbitMQ producer failed to send a message to an appropriate Queue in Java using Spring AMQP?
I'm trying to validate whether a sent message was successfully placed in a queue using the Spring AMQP library. I see that the methods don't seem to error when I send a message to a queue which has ...
-3
votes
1
answer
66
views
Unbind queue from exchange in AMQP Spring XML?
Is there a way to declaratively unbind a queue from an exchange in a Spring XML file?
I attempted this based on a result from ChatGPT but the "unbind-queue" element doesn't event exist, ...
0
votes
1
answer
59
views
How do I hook into Channel closed event? Once per channel opened
I have an annotation-based Rabbit consumer represented by a @RabbitListener-annotated method.
I also have a configuration class to configure my Factory e.g.
@Bean
public ...
0
votes
1
answer
164
views
Spring-amqp-QueueBuilder should hold ref to Queue and not String name
I have 2 anonymous queues. They both are setup with ___Declarables extends AbstractAmqpDeclarables
which are instantiated as @Bean on startup.
But at the time of startup - rabbitMQ hasnt given the ...
0
votes
1
answer
404
views
How to exclude specific exceptions from Spring AMQP retry policy with SimpleRetryPolicy?
I have a RabbitListener in my Spring AMQP application and I'm using a custom RabbitListenerFactory with a SimpleRetryPolicy configured for message retries. However, I want to exclude certain ...
1
vote
0
answers
250
views
How to add exponentially increasing delay for each retry in Spring AMQP?
Let's say I define two queues named events and events.dlq. Both queues are dead letter queues of each other.
As far as I understand, there are two ways to add delay to retry: (other than using plugin)
...
0
votes
1
answer
235
views
Converter issue with TestRabbitTemplate (Spring AMQP)
I am trying to run an integration test for my RabbitListener in Spring AMQP while the broker is not running so I am using TestRabbitTemplate. I am using a Jacksonized object and the ...
0
votes
1
answer
52
views
Spring AMQP: How to register a user-defined SpEL function?
Due to the Spring Expression Language Reference it's possible to register user-defined funtions which can be used in expressions.
How can I register such a function in the context of Spring AMQP in ...
0
votes
1
answer
73
views
SimpleMessageContainer can't listen to Message object - Spring RabbitMQ
I am using Dynamic queues and container listeners and my problem is that the method I have to listen to a specific queue won't receive Message objects. I get a ListenerExecutionError exception saying :...
0
votes
1
answer
292
views
Spring AMQP separate connections
We are currently writing a library that consumes rabbitmq events with spring-amqp.
This library needs to be used from some applications that themselves use rabbitmq with spring-amqp.
Is it possible to ...
0
votes
1
answer
73
views
Repository save not rollbacked if send message fails
Given the following code :
@RabbitListener
public void process(Message myMessage) {
Event event = ..get event from myMessage
handleMessage(event);
}
@Transactional
public void handleMessage(...
0
votes
1
answer
149
views
Throwing exceptions in RabbitMQ listener interceptors (advices)
I've a listener like the following :
@RabbitListener(queues = "${myQueue}")
public void receiveMessages(Message message) {
doTheBusinessLogic(message)
}
I understand from here
What is ...
0
votes
1
answer
149
views
How to publish to a Red Hat AMQ 7 topic using AMQP 1.0 from a test case using amqp-10-jms-spring-boot-starter
I created a subscriber to a multicast queue. When starting the application I can see that the multicast address gets created, the client queue underneath gets created and if I use the web interface to ...
0
votes
1
answer
118
views
SpringBoot application stopped about 1 minute if exception occurred on starting
I have spring boot application that starts like this:`
SpringApplication.run(Application.class, args);
and there is component RabbitHandlers on the creation of which I get error:
Component
public ...
3
votes
2
answers
394
views
How to get AMQP Message properties in Apache Camel AMQP Component
I have a Springboot application using Apache Camel AMQP component to comsume messages from a Solace Queue. To send a message to the Queue I use Postman and the Solace REST API. In order to ...
0
votes
1
answer
358
views
Using Spring Boot @MockBean annotation in RabbitMQ Listener
I have a base class for integration tests which is setting up a Testcontainer for RabbitMQ. I'm inheriting in every Integration Test from this particular class and it works really well for me.
However,...