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

RabbitTemplate receive messages and requeue

My question is very similar to this one: RabbitTemplate receive and requeue Unfortunately it has been marked as answered though the answer doesn't suit my needs. I want to mimic the functionality of the Rabbit Admin UI, i.e. I want to synchronously…
Ruslan
  • 3,063
  • 1
  • 19
  • 28
5
votes
1 answer

How to specify additional info on a rabbit message when it's dead lettered

I have a rabbit queue with messages for consuming. I also have a listener that can fail. The queue is configured with a dead letter exchange (along with a dead letter queue). What I want is to see an exception info in the messages sitting in the…
Ruslan
  • 3,063
  • 1
  • 19
  • 28
5
votes
1 answer

Spring amqp batch receiving messages

We use Spring AMQP to read message from RabbitMQ, right now we only read one message at a time off the queue, is there anyway I can read multiple messages off the queue then process the batch? I see there is a BatchingStrategy available in Spring,…
user468587
  • 4,799
  • 24
  • 67
  • 124
5
votes
1 answer

Getting "java.lang.NoClassDefFoundError: com/rabbitmq/client/impl/LongString" while retrieving messages from reply Q

I am using spring-integration-amqp 4.1.4 with rabbitmq amqp-client 3.5.3. Messages are being delivered alright but reply messages retrieval raises following exception. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer -…
Alok Sharma
  • 51
  • 1
  • 2
5
votes
5 answers

Is there a size limit on a RabbitMQ message header?

I plan on storing stacktraces in the RabbitMQ message header. Do message headers have a size limit?
Glide
  • 20,235
  • 26
  • 86
  • 135
5
votes
0 answers

RabbitMQ : Create Dynamic queues in Direct Exchange

I am new to RabbitMQ, I just went through Rabbitmq docs (Routing). I am quite confused between Exchange with routing keys. My requirement is , I want to create multiple queues dynamically. Please refer below diagram. Ex. Lets say If producer create…
Morez
  • 2,048
  • 5
  • 36
  • 49
5
votes
2 answers

Trying to migrate over from xml name space config to a java @Configurable cannot replicate

I am trying to migrate from XML Spring amqp config to a java annotation based one because it is "simpler". Not sure what I am doing wrong the XML config works fine but the java @Configurable throws a "Caused by: java.net.SocketException: Connection…
Selwyn
  • 3,118
  • 1
  • 26
  • 33
5
votes
2 answers

rabbitmq with spring amqp - messages stuck in case of AmqpException

I am throwing an AmqpException inside of my consumer. My expectation is that the message will return back to the queue in FIFO order and will be reprocessed sometime in the future. It seems as if Spring AMQP does not release the message back to the…
Vladimir
  • 1,120
  • 2
  • 11
  • 18
5
votes
1 answer

Spring AMQP: how to avoid manual declaration of many queues?

Having created a basic spring-amqp setup, I see that for every type of message I want to send (using message POJOs), I need to declare the queue in the spring config. So for every pair of these: amqpTemplate.convertAndSend("queue1", new…
Amir Abiri
  • 8,847
  • 11
  • 41
  • 57
5
votes
3 answers

Is there any option to set AutomaticRecoveryEnabled in RabbitMQ using Spring-AMQP?

Getting stocked while doing with RabbitMQ using Spring-AMQP. Just need to get a way to configure AutomaticRecoveryEnabled and NetworkRecoveryInterval using Spring-AMQP. There is a direct option to set these flages if you you developing using native…
lambodar
  • 3,495
  • 5
  • 34
  • 58
5
votes
2 answers

Execution of Rabbit message listener failed, and no ErrorHandler has been set. Failed to invoke target method with argument type = [class [B],

I am using spring amqp rabbitmq, and sending messages using Message message = MessageBuilder .withBody(item.toString().getBytes()) .setReplyTo("importReply") .setCorrelationId(item.toString().getBytes()).build(); My message handler is public class…
vishal
  • 3,993
  • 14
  • 59
  • 102
5
votes
2 answers

Spring ampq consumer - "No Session found for current thread" error in first attempt

I have a Spring MVC application. I want to use spring ampq to execute my asynchronous tasks. My REST backend uses @Transactional annotation to manage the transactions. After doing its work it pushes a task to the exhange and then returns. Then the…
nilgun
  • 10,460
  • 4
  • 46
  • 57
5
votes
1 answer

Spring AMQP/RabbitMQ and Hibernate Transaction Mananger

I have a Spring application that uses Hibernate and PostgreSQL. It also uses Spring AMQP (RabbitMQ). I am using the Hibernate Transaction manager configured as follows:
CAL5101
  • 303
  • 1
  • 3
  • 11
4
votes
1 answer

Spring AMQP - How to confirm that a message is delivered and Routed successfully?

I am looking for a way to delivery a message, and once the message is delivered (and routed) successfully, i need to perform some operations. I have enabled publisher confirms and returns…
Jerald Baker
  • 1,121
  • 1
  • 12
  • 48
4
votes
1 answer

Springboot RabbitMQ with concurrent consumers

i have a simple architecture, in which one of three processes (actually a spring-boot dockerized container) produces thousands of messages to a exchange/queue, and ALL three processes consume those messages. I want the consumerside to be…
DocJones
  • 649
  • 7
  • 26