是否有用于在RabbitMQ上列出队列和交换的API? [英] Is there an API for listing queues and exchanges on RabbitMQ?

查看:110
本文介绍了是否有用于在RabbitMQ上列出队列和交换的API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看了很多,但是还没有找到一种好的编程方式来列出RabbitMQ服务器上的队列.

I've looked quite a bit, but I haven't been able to find a good programmatic way to list the queues on a RabbitMQ server.

这很重要,因为完成队列和交换后,我需要清理它们.我并不总是有一个很好的完成"事件可以用来触发清理,因此我想使用更多的垃圾收集模型来完成它.如果我可以列出队列,则可以验证与它们相关的对象是否应该生成更多条目并清理它们.

This is important because I need to clean up my queues and exchanges when I'm done with them. I don't always have a good "done" event that can be used to trigger a cleanup, so I'd like to do it with more of a garbage collection model. If I can list the queues, I can verify that the objects that they're related to shouldn't be producing more entries and clean them up.

我知道我可以使用rabbitmqctl来做到这一点,但这需要提升的特权.

I know I can use rabbitmqctl to do it, but that needs elevated privileges.

由于无法找到以编程方式列出队列的方法,因此我一直在数据库中保留名称列表.可以,但是很丑.

Since I haven't been able to find a way to list the queues programmatically, I've been keeping a list of names in the database. That works, but it's ugly.

推荐答案

您可以使用Alice- http://github.com/auser/alice .这是一个执行rabbitmqctl命令的REST接口

You could use Alice - http://github.com/auser/alice. It is a REST interface to execute rabbitmqctl commands

这篇关于是否有用于在RabbitMQ上列出队列和交换的API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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