Questions tagged [spring-rabbit]

Spring components for AMQP-based messaging with RabbitMQ.

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

1331 questions
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
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
16
votes
4 answers

Disabling the listening to rabbit queues from spring application.properties

I want to create an application-development.properties file in spring to define a dev environment. In this environment want to disable the listening to the rabbit queues because I don't want to interfere with the staging queues while debugging etc.…
Adi
  • 391
  • 2
  • 3
  • 10
15
votes
2 answers

How to limit concurrent message consuming based on a criteria

The scenario (I've simplified things): Many end users can start jobs (heavy jobs, like rendering a big PDF for example), from a front end web application (producer). The jobs are sent to a single durable RabbitMQ queue. Many worker applications…
Pierre-David Belanger
  • 1,004
  • 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
13
votes
9 answers

Prevent @RabbitListener in spring-rabbit from trying to connect to server during integration test

I want to run some acceptance tests for my services that are using rabbitMq but I want to ignore all that require inter-service communication (amqp). The problem however is that Spring tries to connect to the (non-exisiting) rabbit host on startup…
Pete
  • 10,720
  • 25
  • 94
  • 139
12
votes
2 answers

Spring AMQP - Sender and Receiving Messages

I am facing an issue in receiving a message from RabbitMQ. I am sending a message like below HashMap senderMap=new HashMap<>(); senderMap.put("STATUS", "SUCCESS"); senderMap.put("EXECUTION_START_TIME", new…
BIndu_Madhav
  • 577
  • 1
  • 8
  • 21
12
votes
2 answers

How do we hook into before/After message processing using @RabbitListener

Problem: I am migrating from MessageListener interface impl to @RabbitListener. I had logic like this where I was doing "pre" and "post" message processing on a MessageListener that was inherited by several classes example: public…
Selwyn
  • 3,118
  • 1
  • 26
  • 33
11
votes
5 answers

Exceptions in rabbitmq with spring boot

I am getting the following exception repeatedly when I start my spring boot application with rabbitmq. The entire flow is working fine even with the below exceptions. is it to do with the auto-delete in by means ? 08 Jul 2015 16:20:17,652…
Pradeep
  • 850
  • 2
  • 14
  • 27
1
2 3
88 89