我正在检查是否有办法使用 curl 清除 rabbitmq 队列?我知道使用命令行,但我需要使用 curl 的东西?
建议/帮助表示赞赏
注意:-使用此链接,我没有得到要使用的确切 curl 命令
实际上,您提供的链接确实包含以下信息:
/api/queues/vhost/名称/内容
队列的内容。删除以清除。
注意你不能得到这个。
例如:
curl -XDELETE -u admin http://localhost:15672/api/queues/%2f/queuetopurge/contents
%2f 是引用/vhost。
这是根据rabbit api文档的rabbit;
curl -i -u guest:guest -H "content-type:application/json" -XDELETE http://localhost:15672/api/queues/%2F/yourQueueName/contents