Questions tagged [spring-amqp]

Spring components for AMQP-based messaging.

The Spring AMQP project applies core Spring concepts to the development of AMQP-based messaging solutions. It provides a "template" as a high-level abstraction for sending and receiving messages. It also provides support for Message-driven POJOs. Its libraries facilitate management of AMQP resources while promoting the use of dependency injection and declarative configuration. In all of these cases, you will see similarities to the JMS support in the Spring Framework.

The spring-amqp sub-project is a general abstraction, with spring-rabbit being the implementation for RabbitMQ.

Resources

See Also

1608 questions
127
votes
17 answers

Spring AMQP + RabbitMQ 3.3.5 ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN

I am getting below exception org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker…
Javaboy
  • 2,044
  • 2
  • 20
  • 24
52
votes
3 answers

RabbitMQ/AMQP - Best Practice Queue/Topic Design in a MicroService Architecture

We are thinking of introducing a AMQP based approach for our microservice infrastructure (choreography). We do have several services, let's say the customer-service, user-service, article-service etc. We are planning to introduce RabbitMQ as our…
Fritz
  • 872
  • 1
  • 8
  • 17
42
votes
1 answer

How to configure RabbitMQ connection with spring-rabbit?

I'm following this guide to learn how to use spring-rabbit with RabbitMQ. However in this guide, the RabbitMQ configuration is as default(localhost server and with credential as guest/guest). What should I do if I want to connect to an remote…
kenshinji
  • 2,021
  • 4
  • 25
  • 39
30
votes
3 answers

Spring RabbitMQ - using manual channel acknowledgement on a service with @RabbitListener configuration

How to acknowledge the messages manually without using auto acknowledgement. Is there a way to use this along with the @RabbitListener and @EnableRabbit style of configuration. Most of the documentation tells us to use…
Gururaj Nayak
  • 636
  • 1
  • 9
  • 18
26
votes
8 answers

how to mock spring amqp/rabbit in spring boot test

How to mock spring rabbitmq/amqp so it will not fail during a Spring Boot Test while trying to auto create exchanges/queues? Given I have a simple RabbitListener that will cause the queue and exchange to be auto created like…
domi
  • 2,167
  • 1
  • 28
  • 45
22
votes
2 answers

Spring amqp converter issue using rabbit listener

I think I am missing something here..I am trying to create simple rabbit listner which can accept custom object as message type. Now as per doc it says In versions prior to 1.6, the type information to convert the JSON had to be provided in message…
user3444718
  • 1,485
  • 6
  • 22
  • 32
21
votes
5 answers

Unable to connect Spring AMQP / Rabbit MQ : org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect

I am new to Spring AMQP / Rabbit MQ. Am using a Spring AMQP / Rabbit MQ in my project. I am facing following error after running a tomcat: org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer - Consumer raised exception,…
AmolKumar
  • 223
  • 1
  • 2
  • 5
20
votes
1 answer

multiple Rabbitmq queues with spring boot

From spring boot tutorial: https://spring.io/guides/gs/messaging-rabbitmq/ They give an example of creating 1 queue and 1 queue only, but, what if I want to be able to create more then 1 queue? how would it be possible? Obviously, I can't just…
winter
  • 2,687
  • 4
  • 18
  • 27
19
votes
1 answer

How to use Ack or Nack in Spring AMQP

I am new to Spring AMQP. I am having an application which is a producer sending messages to the other application which is a consumer. Once the consumer receives the message, we will do validation of the data. If the data is proper we have to ACK…
Chandan
  • 333
  • 1
  • 6
  • 14
17
votes
1 answer

Set message header in rabbitmq while sending

I want to set message header while sending a message to rabbit. I am using below code, but confused how to set message header in it. public static void sendMessage(String routingKey,final Object message,Class type){ DefaultClassMapper…
Rajat Goyal
  • 465
  • 1
  • 5
  • 20
17
votes
1 answer

How is concurrency in Spring AMQP Listener Container implemented?

My container XML config:
Parobay
  • 2,549
  • 3
  • 24
  • 36
15
votes
3 answers

Spring AMQP v1.4.2 - Rabbit reconnection issue on network failure

I am testing the following scenario in Spring AMQP v1.4.2 and it fails to reconnect after a network disruption: Start the spring application which consumes messages asyncly using rabbit:listener-container and rabbit:connection-factory (detailed…
Amir Moghimi
  • 1,391
  • 1
  • 11
  • 19
15
votes
1 answer

Dynamically add new queues, bindings and exchanges as beans

I'm currently working on a rabbit-amqp implementation project and use spring-rabbit to programmatically setup all my queues, bindings and exchanges. (spring-rabbit-1.3.4 and spring-framework versions 3.2.0) The declaration in a javaconfiguration…
JustinV
  • 165
  • 1
  • 6
14
votes
2 answers

Spring RabbitTemplate - How to create queues automatically upon send

I am using RabbitMQ together with Spring's RabbitTemplate. When sending messages to queues using the template send methods, I want the queue to automatically be created/declared if it is not already exists. It is very important since according to…
Oz Molaim
  • 2,016
  • 4
  • 20
  • 29
14
votes
2 answers

RabbitMQ RPC across multiple rabbitMQ instances

I have three clients each with their own RabbitMQ instances and I have an application (let's call it appA) that has its own RabbitMQ instance, the three client applications (app1, app2, app3) wants to make use of a service on appA. The service on…
Jan Vladimir Mostert
  • 12,380
  • 15
  • 80
  • 137
1
2 3
99 100