Questions tagged [spring-amqp]

Spring components for AMQP-based messaging.

Filter by
Sorted by
Tagged with
0 votes
1 answer
49 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" ...
user3191449's user avatar
0 votes
1 answer
11 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 ...
justin's user avatar
  • 37
0 votes
1 answer
27 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-...
Gabriela83's user avatar
-2 votes
0 answers
30 views

RabbitMockConfiguration not available for Spring Boot AMQP mocking Application Test

TL;DR: What dependency is missing in the project – why can the Mock classes not be resolved? We're about to do a big migration from Java 8 → 17, and so far i've written a lot of non-spring unit tests ...
Philzen's user avatar
  • 3,973
0 votes
1 answer
58 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 ...
skywing99's user avatar
0 votes
0 answers
21 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 ...
patrick BAK's user avatar
1 vote
1 answer
55 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 ...
Owen Choi's user avatar
0 votes
1 answer
32 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 ...
AndCode's user avatar
  • 392
1 vote
1 answer
28 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. ...
Sean Liu's user avatar
0 votes
1 answer
187 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 ...
stikku's user avatar
  • 546
0 votes
0 answers
83 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:...
Freshpipe's user avatar
0 votes
1 answer
22 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 ...
Antonis Koursoumis's user avatar
1 vote
0 answers
113 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 ...
Wall-E's user avatar
  • 438
0 votes
2 answers
98 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 ...
Igor's user avatar
  • 11
0 votes
1 answer
62 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 ...
Piotr Olaszewski's user avatar
0 votes
0 answers
45 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 ...
Adam Lukaszewski's user avatar
0 votes
0 answers
136 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 ...
Marvin's user avatar
  • 1,650
1 vote
1 answer
67 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 ...
Huka's user avatar
  • 380
0 votes
1 answer
217 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 ...
Prithivi Thiyagu's user avatar
0 votes
1 answer
100 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 ...
Rostyslav Khoptiy's user avatar
0 votes
0 answers
97 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 ...
Harsha Limaye's user avatar
0 votes
1 answer
215 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....
Imperious's user avatar
0 votes
1 answer
149 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 ...
Prithivi Thiyagu's user avatar
0 votes
1 answer
160 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 ...
Jeff's user avatar
  • 43
-3 votes
1 answer
58 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, ...
Steve King's user avatar
0 votes
1 answer
41 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 ...
Daniele Repici's user avatar
0 votes
1 answer
123 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 ...
Endre Moen's user avatar
0 votes
1 answer
300 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 ...
WhiteCherry's user avatar
1 vote
0 answers
208 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) ...
Süleyman Gezsat's user avatar
0 votes
1 answer
196 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 ...
Poet's user avatar
  • 23
0 votes
1 answer
45 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 ...
Oliver's user avatar
  • 363
0 votes
1 answer
52 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 :...
thedoctor's user avatar
0 votes
1 answer
176 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 ...
Daniel Christiany's user avatar
0 votes
1 answer
72 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(...
obe6's user avatar
  • 1,743
0 votes
1 answer
85 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 ...
obe6's user avatar
  • 1,743
0 votes
1 answer
101 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 ...
cp5's user avatar
  • 1,087
0 votes
1 answer
95 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 ...
Haster's user avatar
  • 113
2 votes
2 answers
334 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 ...
MostafaBakr's user avatar
0 votes
1 answer
302 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,...
twobiers's user avatar
  • 1,058
1 vote
2 answers
556 views

How to use RabbitListenerEndpointRegistry?

I wanted to destory my specific RabbitListener... So I searched and most of people used this way. @Autowired RabbitListenerEndpointRegistry endpointRegistry; endpointRegistry.getListenerContainer( &...
seunggyu lee's user avatar
0 votes
2 answers
267 views

Spring-amqp with empty queue name is awaiting_declaration

I want to create a queue with empty name so that the name can be generated by RabbitMQ - var queue = QueueBuilder .durable("") .exclusive() .autoDelete().build var binding = ...
Endre Moen's user avatar
0 votes
1 answer
168 views

Spring AMQP: Amqp.outboundAdapter to @RabbitListener, error sending response due to missing "reply-to" property

So, I have 2 Spring Boot applications (2.6.10) that need to communicate via RabbitMQ / AMQP. App #1 is Spring Integration based and uses Amqp.outboundAdapter(rabbitTemplate).routingKey("app1-to-2&...
Christoph Dahlen's user avatar
0 votes
0 answers
75 views

During spring-boot startup, because of spring-amqp, thread locked. How should I solve it?

environment spring boot 2.7.5 spring amqp 2.4.7 spring rabbit 2.4.7 situation when spring boot application start, because of RabbitAdmin.afterProperties(), main thread locked. The cause is that the ...
Lee Jun Gyun's user avatar
0 votes
0 answers
30 views

Spring Cloud Stream Rabbit - Enabling error channel reduces throughput

In Spring Cloud Stream Rabbit is there a way to intercept acks in the background. Even though my intent is to only catch NACKS/Errors, since I am enabling publisher returns, it reduces the throughput. ...
Aravind1986's user avatar
0 votes
1 answer
307 views

Caused by: org.springframework.amqp.AmqpRejectAndDontRequeueException: No correlation header in reply

I'm trying to migrate the spring boot parent and I had the displeasure of starting to receive an error message when trying to consume the messages. The error is the title, and this occurred when ...
Marcos Stefani Rosa's user avatar
0 votes
1 answer
836 views

Caused by: java.net.SocketException: Connection reset by peer: socket write error

I'm trying to connect to rabbitMQ over SSL using Spring Boot 2.7.4 and java 11.0.14 I was following this example here: I have added the following configurations: properties file: # RabbitMQ Server ...
Mohamed Nagy's user avatar
0 votes
1 answer
59 views

Handling Custom exception for rabbitmq listener connectivity issues

I have a listener which consumes the messages from the third party producer.I need to send the custom error message in case of the queue connection issues I'm new to rabbit mq .May I know what are the ...
Anonymous's user avatar
0 votes
1 answer
30 views

Having zero queues for a listening container in Spring boot AMQP

I'm setting up an spring boot application which supports websockets and AMQP. Whenever a client opens a websocket connection to my spring boot application, the client should be allowed to subscribe ...
Chillychillx's user avatar
0 votes
1 answer
163 views

Spring AMQP - Return Exception Message From RabbitListenerErrorHandler

I'm trying to handle exception with an implementation of RabbitListenerErrorHandler in my project which uses Spring AMQP. Here is how I defined my consumer: @RabbitListener(queues = "inqueue"...
İlkay Gunel's user avatar
0 votes
1 answer
50 views

Trusting packages in Jackson2JavaTypeMapper

Everything is working fine when I trust all packages using '*' but I'd like to trust only my domain's package. This is what I tried and its not working if (javaTypeMapper instanceof ...
dev-rifaii's user avatar

1
2 3 4 5
33