在队列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 - 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.
请给我看看其他帖子!