Gregory Sysoev
Gregory Sysoev

Reputation: 321

Rabbitmq. Move part of messages from one queue to another

I have two queues

For example:

A = ['foo', 'abo', 'aboba', 'bar'];
B = [];

I'd like to move only 'aboba', 'bar' from queue A to B. It doesn't matter which side of A to cut.

I know about rabbitmq shovel, but I don't found tools for my case in this plugin.

Upvotes: 1

Views: 633

Answers (1)

jrhodin
jrhodin

Reputation: 669

In your example you could set a max-length-policy to 2 and then use a shovel to move the remaining messages.

This is not a general solution as you might not know at which depth in the queue you are to create the cut.

Upvotes: 0

Related Questions