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
7
votes
1 answer

Spring Integration and AMQP: How to gracefully handle deserialization exceptions?

I use RabbitMQ and Spring Integration to handle incoming JSON messages. The relevant part of the configuration looks something like this:
Philipp Jardas
  • 3,222
  • 3
  • 29
  • 42
6
votes
0 answers

SpringBoot AMPQ on Docker cannot always connect to the queue

I have a SpringBoot app and I want to conncct to rabbit mq and read some messages. However I do have an issue that when I deploy the app, sometimes it connects to rabbit instantly and starts working but more often It only tries to connect and tries…
Clyde Barrow
  • 1,924
  • 8
  • 30
  • 60
6
votes
1 answer

How to make JUnit take any Lambda expression

I am using SpringAMQP where I am testing producer method (basically AMQP template) which is like this. public void send(Message message, Throwable error, String queue, String routingKey) { this.amqpTemplate.convertAndSend( …
nicholasnet
  • 2,117
  • 2
  • 24
  • 46
6
votes
1 answer

How to publish a AMQP message with Spring to a parking lot queue, after a loop in dead letter queue and TTL in a specific scenario?

I would like to achieve following scenario in my application: If a business error occurs, the message should be send from the incomingQueue to the deadLetter Queue and delayed there for 10 seconds The step number 1 should be repeated 3 times The…
dzensik
  • 695
  • 11
  • 20
6
votes
1 answer

RabbitMQ Failed to declare queue and Listener is not able to get queue on server

I have spring boot rabbitmq application where i have to send an Employee object to queue. Then i have set up a listener application. Do some processing on employee object and put this object in call back queue. For this, i have created below objects…
6
votes
2 answers

Activemq vs rabbitmq

I have read a few discussions and forums but still fail to understand which one is better rabbitmq vs activemq. I have heard the delay in rabbitmq is more because all traffic is first diverted to a central node. It would be good if someone can point…
sirajnadwar
  • 237
  • 2
  • 6
  • 13
6
votes
2 answers

How to use interceptor with Spring AMQP

Is there a way to intercept messages once template.convertAndSend is called, before the message is delivered to RabbitMQ. Also any way to intercept the message before reaching the handler? I can handle the message using PostProcessor for publisher,…
basu76
  • 441
  • 10
  • 19
6
votes
1 answer

Spring integration pubsub vs Spring amqp RabbitMQ pubsub

I am working on a MicroBlog spring mvc hibernate application. I need to implement a publish subscribe functionality like twitter. I am using RabbitMQ for messaging with Spring AMQP abstraction. Everywhere I see on web the pubsub examples are given…
underdog
  • 4,447
  • 9
  • 44
  • 89
6
votes
2 answers

SPRINGAMQP or RabbitMq Java API

I am new to rabbitMq and Spring AMQP . I am building a new project from scratch . Here for one of the components we are using rabbit-Mq as message broker . In this project ,primarily all the development has been happening in Java . We are using…
Ankur Garg
  • 2,553
  • 8
  • 30
  • 41
6
votes
3 answers

Camel rabbitmq + convertSendAndReceive() : Could not convert incoming message with content-type [null]

I have a component that sends a message to a worker service waiting back the result. @Autowired private RabbitTemplate rabbit; [...] Object response = rabbit.convertSendAndReceive("testQ", ...); The worker service is implemented with Apache Camel…
Atos
  • 717
  • 2
  • 8
  • 13
6
votes
2 answers

How to set the consumer-tag value in spring-amqp

I am trying to update the consumer-tag to be more informative than the randomly generated string. We have a pattern which we use that includes hostname + identifier + randomized string. This works fine in our other services (ie: NodeJS with ampqlib)…
Mig
  • 63
  • 1
  • 3
6
votes
1 answer

Manually ack messages in RabbitMQ

Previously I was reading all the messages present in the queue, but now I have to return specific amount of message based of users choice(count). I try to change the for loop accordingly but its reading all the message because of auto acknowledge.…
lambodar
  • 3,495
  • 5
  • 34
  • 58
6
votes
1 answer

Using @RabbitListener with Jackson2JsonMessageConverter

I have spent the last little while trying to get it so that my handler that is registered using @RabbitListener will have the message converted with the Jackson2JsonMessageConverter. Unfortunately no matter what configuration setup I try only the…
Shawn Clark
  • 3,330
  • 2
  • 18
  • 30
6
votes
1 answer

Send files through RabbitMQ

Is it a good idea to send files with size about 1Mb through RabbitMQ? I want to send message in json format with binary fields corresponding to the files. And how to do it properly using spring-amqp? Just by publishing object with next class? class…
Nawa
  • 2,058
  • 8
  • 26
  • 48
6
votes
1 answer

Request-response pattern using Spring amqp library

everyone. I have an HTTP API for posting messages in a RabbitMQ broker and I need to implement the request-response pattern in order to receive the responses from the server. So I am something like a bridge between the clients and the server. I push…
Hristo Angelov
  • 1,019
  • 1
  • 15
  • 34