Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving single message in RabbitMq

Tags:

rabbitmq

I have got several messages on error queue which has name TestQueue_errors.

One of the messages on error queue is important and should be moved back to service queue TestQueue so it can be processed again. The other messages on error queue are broken and should stay on error queue.

I have tried to do that with shovel plugin but it seems it is able only to move all messages from one queue to another. Is there a way I could achieve that, to move single message from one queue to another?

like image 340
tomaso Avatar asked Mar 30 '17 06:03

tomaso


People also ask

What is shovel in RabbitMQ?

Shovel is a plugin for RabbitMQ that enables you to define replication relationships between brokers. It can for example be used to balance the load of a queue or when you need to be able to take messages out of one RabbitMQ broker, and insert them into another.

How many messages RabbitMQ can handle?

Number of queues Queues are single-threaded in RabbitMQ, and one queue can handle up to about 50 thousand messages.

Can RabbitMQ replay messages?

As all current RabbitMQ queue types have destructive consume behaviour, i.e. messages are deleted from the queue when a consumer is finished with them, it is not possible to re-read messages that have been consumed. Streams will allow consumers to attach at any point in the log and read from there.


1 Answers

As far as I know Rabbit Management does not allow to do it. The only thing you can do is to publish this message again.

Maybe there are some tools which give possibility to achieve it but it is not a standard behaviour.

Here are actions which you are able to perform on the queue (from RabbitMQ Management page):

  1. Move all messages from one queue to another
  2. Get all messages without requeue option (they would not be in the queue anymore) enter image description here

  3. Get first N messages without requeue option and then move the rest of messages to another queue

like image 77
PiotrB Avatar answered Nov 14 '22 04:11

PiotrB