Questions tagged [spring-amqp]
Spring components for AMQP-based messaging.
0
votes
1answer
15 views
How to listen queue different virtual hosts?
I need to connect multiple virtual hosts at the same time because I want to listen to queues in multiple hosts. Configuration-based mode only creates one connection by default. How can I create ...
0
votes
1answer
10 views
Which AmqpEvent or AmqpException to handle when an exclusive consumer fails
I have two instances of the same application, running in different virtual machines. I want to grant exclusive access to a queue for the consumer of one of them, while invalidating the local cache ...
0
votes
1answer
18 views
Ramdom com.rabbitmq.client.ShutdownSignalException: connection error
we have an application where we use Spring-AMQP to connect to a remote server through AMQP. Lately, and randomly, we are receiving connection errors. These errors occur once or twice a day at ...
0
votes
1answer
26 views
Require a Listener class for RabbitMQ Channel shutdown exceptions happens in Spring stream applications
We are using spring cloud data flow stream applications and RabbitMQ as a message broker.
In overall stream flow from source to sink modules , we are loosing data when ever we see "ChannelShutdown : ...
0
votes
1answer
33 views
Spring integration - Publisher Confirms with timeout?
This is my current setup:
queue1 and queue2 are marged together with integration flow to channel1:
@Bean
public IntegrationFlow q1f() {
return IntegrationFlows
.from(...
1
vote
1answer
23 views
How do i configure two rabbitlisteners differently in the same project?
I have two queues and they each have messages on them. Queue one has bird objects and queue two has birdspotting object. I'm using a defaultclassmapper to convert the messages back into objects. Is ...
2
votes
1answer
67 views
Set default timeout with publisher confirmations
I want to implement example with AMQP publisher confirmations configured with timeout. Something like this:
private final CountDownLatch confirmLatch = new CountDownLatch(1);
...
5
votes
0answers
73 views
Spring-boot getting “second 'channel.open' seen” error in connection with rabbitmq
I have a spring boot application, using spring-boot version 1.5.16.RELEASE, which adds the below dependencies to my app:
[INFO] | +- com.rabbitmq:http-client:jar:1.0.0.RELEASE:compile
[INFO] | +- ...
0
votes
2answers
23 views
In Springboot microservices api, how to call a another server using AMQP queue, get response from the another service queue, send the response
We are writing the micro-services platform. We have a server A written in spring boot which is exposing API to the outside world.
We have another spring-boot microservice B which needs to be called ...
0
votes
1answer
14 views
@RabittListener ignores routingKey
On the producer side i'm sending multiple object types serialized as json strings. For distinguishing purposes, i'm sending the class name as a routing key.
On the consuming side i try to use ...
0
votes
1answer
17 views
Concept dead letter exchange not working in my environment
I try to use the dead letter exchange with annotations in my java code. Maybe is my assumption wrong how it should work. But in my method processMpcMessage I deserialize the message from a Queue into ...
1
vote
1answer
48 views
Dynamic support for multi RabbitMq virtual hosts in spring boot
i am trying to implement support for multi tenant spring boot application where each tenant application is sending data to the spring boot application via RabbitMq. Each tenant is connected to its own ...
0
votes
1answer
37 views
Elegant way to add multiple @RabbitListener beans to a ContainerFactory
Here is my @Configuration
@Bean
public AmqpAdmin amqpAdmin()
{
RabbitAdmin rabbitAdmin = new RabbitAdmin(connectionFactory());
DirectExchange dirExchange = new ...
0
votes
1answer
26 views
Spring AMQP : How know message generate AmqpRejectAndDontRequeueException
We are a ErrorHandler for the listener.
We are in Spring AMQP auto mode.
In some case we are some exception throw by the Spring (like serialization problem) and the we receive that exception in ...
0
votes
1answer
46 views
Rabbitmq ERROR CachingConnectionFactory:1302 - Channel shutdown: channel error;
I am getting this error
ERROR CachingConnectionFactory:1302 - Channel shutdown: channel error; protocol method: #method(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-message-...
2
votes
1answer
49 views
Spring AMQP manual container is unusually slow
When using Spring AMQP DSL and manually creating a MessageListenerContainer, its throughput is A LOT slower than using @RabbitListener approach. From my understanding, when using @RabbitListener, a ...
0
votes
1answer
36 views
Spring AMQP: Creating multiple queues dynamically
I have a Spring @Configuration class that creates and registers RabbitMQ queues as follows:
@Amqp
@Configuration
public class AmqpConfiguration {
@Bean
ConnectionFactory connectionFactory() {
...
0
votes
1answer
28 views
RabbitTemplate send failure after deleting exchange
I've got following problem. I'm using RabbitTemplate class from spring-rabbit-2.0.5.RELEASE. And send messeges to different exchanges using it. By default everything work fine. But when one of the ...
0
votes
1answer
25 views
How to dynamically add new queues (from different hosts) to @RabitListener?
I'm trying to have a @RabbitListener to listen to several queues from different hosts loaded from properties. the queues are identical and require the same message processing.
I managed to do it "...
0
votes
0answers
61 views
How to make @Lazy spring bean not eligible for creation when ListableBeanFactory#getBeansOfType is called with allowEagerInit = true?
I want to Spring Data Cassandra to be initialized lazily. To do it, I exclude some autoconfigurations and make CassandraCqlClusterFactoryBean @Lazy, and it works. But when I enable rabbit, some code ...
0
votes
1answer
48 views
Spring Cloud Stream: how to republish to dead letter queue and also throw exception
I'm migrating a project that uses Spring AMQP to a project that uses Spring Cloud Stream with RabbitMQ.
In my old project, when some exception occurred while processing a message using @...
0
votes
0answers
33 views
Two Consumers in one class. Stop Consumer A until queue of Consumer B is empty
I have declared one channel declared to a rabbitmq host. I have two consumers (A and B) which are connected to different queues. Is it possible to stop consumer A until the queue of consumer B is (...
0
votes
1answer
31 views
Spring AMQP MessageListenerAdapter - How to split response into multiple messages?
Is it possible to split the response of the delegate from MessageListenerAdapter into separate messages?
public class MyBean {
public List<Response> handleMessage(final MyPayload payload) ...
0
votes
1answer
89 views
Reply received after timeout
I want to register two queues listeners for Spring AMQP with the latest Spring version:
@Bean
public SimpleMessageListenerContainer processingTransactionSaleContainer(ConnectionFactory cf, ...
0
votes
1answer
27 views
Passing dynamic list of queues into a queue listener
I have a Spring Boot application that spins consumers for a section of queues and I want to be able to add queues to those consumers at run time.
I've installed the event exchange plugin (https://www....
0
votes
1answer
15 views
Performance when using RabbitMQ with dynamic queues and persistant messages
I would like to implement dynamic queues with RabbitMQ and create one persistante queue per user I have.
I wonder if the RabbitMQ will not loose in performence if I have a large number of messages ...
0
votes
1answer
26 views
Spring AMQP: Inspecting RabbitMQ config
I am trying to demo the usage of RabbitMQ Credit Flow mechanism as per the blog mentioned here: https://www.rabbitmq.com/blog/2015/10/06/new-credit-flow-settings-on-rabbitmq-3-5-5/
As part of my demo,...
1
vote
1answer
93 views
Dynamic addition of queues to a rabbit listener at runtime
I've got a project where we are going to have hundreds (potentially thousands) of queues in rabbit and each of these queues will need to be consumed by a pool of consumers.
In rabbit (using spring-...
3
votes
1answer
71 views
I have an rabbit amqp listener in springboot, It stucks without closing the application
I have the following code snippet in my actual code. I have mutiple consumers listening to a queue.
@RabbitListener
private void abc(ETLConfigDTO config){
try{
log.info("load started");
...
1
vote
1answer
73 views
Configuring ConnectionFactory for RabbitMQ in Spring Boot AMQP
TL;DR How to create Spring Boot AMQP connection factory programatically?
Hey,
In order to connect to my RabbitMQ I added these to my application.properties file of my Spring Boot app:
spring....
1
vote
1answer
26 views
Spring AMQP is there a way to set the maximum number of consumers across all VMs?
I have 4 instances of my spring boot app running on 4 different JVMs. Is there a way to set maximum global consumers? Currently I have setMaxConcurrentConsumers(1); set. The problem is that there ...
0
votes
0answers
20 views
Spring-AMQP - RetryTemplate not retrying messages
I am trying to use:
RetryTemplate rt = new RetryTemplate();
SimpleRetryPolicy rp = new SimpleRetryPolicy();
rp.setMaxAttempts(2);
rt.setRetryPolicy(rp);
ExponentialBackOffPolicy ebop = new ...
0
votes
1answer
62 views
RabbitMQ and FIFO when multiple consumers
We have multiple consumer to handle create messages, but we want to ensure the FIFO order so if we create a product A, we must to reject the next creations of product A.
The problem is because we ...
3
votes
1answer
60 views
How can I connect to multiple Rabbitmq nodes with Spring Rabbitmq?
I am writing a service with Spring and I am using Spring AMQP in order to connect to Rabbitmq.
I have two rabbitmq clusters, one is only for publishing messages(the messages are sent to the other ...
1
vote
1answer
25 views
Why can't I get the correlationId on the consumer side by using the spring-boot-starter-amqp?
I use the RabbitTemplate send message with my own generated CorrelationData. I've received the correlationId in the cofirmCallBack, but I can't receive it on the consumer side.
I tested this problem ...
1
vote
1answer
30 views
SpringAMQP errorHandler and returnExceptions problem
i am not sure my understanding to errorHandler and returnExceptions is right or not.
but here is my goal: i sent a message from App_A, use @RabbitListener to receive message in App_B.
according to ...
0
votes
1answer
52 views
Spring amqp cachingConnectionFactory not shutting down for a minute
My client application is a Spring-shell application, running SpringBoot 2.1.1.
We are creating rabbitmq connection on demand CachingConnectionFacotry
CachingConnectionFactory connectionFactory =...
0
votes
1answer
14 views
Spring AMQP RPC consumer how to determinated if the publisher channel has been closed
In RPC mode when the consumer receive and treat a message, is it possible to determinated whether the publisher is there or not waiting the response ?
For exemple if I stop the publisher process, the ...
1
vote
1answer
42 views
Spring AMQP RabbitMQ - Error Handling for Direct reply-to
I am trying to handle exceptions that are resulting from a amq.rabbitmq.reply-to queue specificially things like: "org.springframework.amqp.AmqpRejectAndDontRequeueException: Reply received after ...
0
votes
1answer
54 views
Spring AMQP RabbitMQ RPC - Handle response exceptions
I am trying to use a RPC AMQP RabbitMQ queue to send and receive messages. The problem is that I have set a setReplyTimeout value. When that happens I get a "org.springframework.amqp....
1
vote
1answer
41 views
Spring AMQP multi-threaded producer
I have a multi-threaded application that uses a RabbitTemplate (with CachingConnectionFactory) to send messages to the broker. I need to ensure that the messages are delivered in order.
I have seen ...
1
vote
1answer
24 views
Spring AMQP RabbitMQ RPC - Queue with with some messages that do not expect a response
I am trying to create a priority RPC queue that can accept some messages that expect a response and some messages that do not expect a response. The problem I am facing is that when I send messages ...
0
votes
0answers
30 views
Spring AMQP RabbitMQ RPC Priority Queue
I am trying to have a RPC queue where messages from the Producer/client are prioritized to the consumer. I want all priority 2 messages processed before any priority one messages. I also want each ...
1
vote
1answer
20 views
Validate exchange, routing key when publishing message using Spring RabbitMessagingTemplate
Is there a way to validate that the exchange and routing key/queue when sending message using RabbitMessagingTemplate? Currently, there is a default exchange and routing key which blank string and ...
0
votes
1answer
37 views
Does Spring JMS allow consumer priority?
I need to set consumer priority in a Java app consuming from an AMQP broker.
I want to use Spring JMS to set the consumer priority.
Broker-side, this seems simple; most popular brokers allow setting ...
0
votes
1answer
27 views
Spring RabbitTemplate execute method visibility
RabbitTemplate has an execute method that is public, and another one that receives a ConnectionFactory but it is private. I could understand that it is private if ConnectionFactory was not exposed, ...
2
votes
1answer
121 views
Can't convert Message object from RabbitMQ to java class
I created my RabbitListener to get messages from RabbitMQ queue.
My rabbitMQ message:
Properties
priority: 0
delivery_mode: 2
headers:
__TypeId__: com.kmb.bank.models.Transfer
...
0
votes
1answer
42 views
Message is not routing to dead letter queue when consumer is down
I've a service A which is publishing message to Queue(Q-A).
I've a dead letter queue(DLQ) bounded to DLX with DLRK.
Queue A is bounded to an exchange(E-A) with a routing key(RA).
I've also set x-...
2
votes
2answers
29 views
Configure MessagePostProcessor globally in Spring RabbitTemplate
Related to
How do we hook into before/After message processing using @RabbitListener
If I want to configure RabbitTemplate globally and set MessagePostProcessor, what is the best way?
Should I ...
0
votes
1answer
23 views
Create a spring session in amqp rpc client
I developped spring remoting amqp rpc applications.
That's works well for methods that don't use bean with Scope SESSION.
For the other methods, the client can't use spring session, and I get this ...