在队列之间移动消息 rabbitMQ [英] Moving messages between queues rabbitMQ

查看:39
本文介绍了在队列之间移动消息 rabbitMQ的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在 Rabbit 的队列之间(手动)移动消息.

I am looking to be able to move messages between queues (manually) in Rabbit.

例如:

first-queue has messages ['a','b','c','d','e','f']
second-queue has messages ['x','y']

我希望能够将例如消息a"从第一个队列移动到第二个队列.这可以是手动操作.两个队列都在同一个代理上,我不想通过任何交换发送它们.有没有办法做到这一点?我一直在玩rabbitmqctl,但似乎无法让它工作.我对任何其他可以让我完成此任务的工具持开放态度.最终,我希望有某种消息选择器(例如,将带有某些标头字段 = X 的所有消息从第一个队列移动到第二个队列).

I want to be able to move for example message 'a' to second-queue from first-queue. This can be a manual operation. Both queues are on the same broker, and I do not want to send them through any exchange. Is there anyway to do this? I have been playing with rabbitmqctl but can't seem to get it to work. I am open to any other tools that would allow me to accomplish this. Eventually I am hoping to have some sort of message selector (for example move all messages with some header field = X from first-queue to second-queue).

我还是 rabbitmq 和 amqp 的新手,但一直找不到有关如何执行此操作的文档(如果可能的话).

I am still new to rabbitmq and amqp but have been unable to find documentation on how to do this (if it is even possible).

谢谢.

推荐答案

@Dax - 我刚刚在这里回答了同样的问题:是否可以在 RabbitMQ 队列之间移动/合并消息?

@Dax - I just answered this same question here: Is it possible to move / merge messages between RabbitMQ queues?

我在那里有很长的描述.为避免重复内容,我不想复制/粘贴.

I have a long description there. To avoid duplicate content I don't want to copy/paste.

听起来您正在寻找的是 rabbitmq 铲子插件.

It sounds like what you are looking for is the rabbitmq shovel plugin.

它内置在核心中,只需启用它:

It is built into the core, simply enable it:

rabbitmq-plugins enable rabbitmq_shovel
rabbitmq-plugins enable rabbitmq_shovel_management

从 GUI 的管理"部分,您会发现创建铲子的简单界面.

From the Admin section in the GUI you'll find an easy interface to create shovels.

请查看我的其他帖子!

这篇关于在队列之间移动消息 rabbitMQ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆