Py学习  »  MQ

rabbitmq-如何查找队列模式(默认或懒惰)

Sumit Maingi • 4 年前 • 885 次点击  

问题很简单,在rabbitmq中,如何找到队列模式(默认或懒惰)。

我尝试了文档和实验:

  1. 兔骨髓瘤细胞系
  2. rabbitmq管理插件
  3. HTTP API
  4. 用于nodejs的amqplib

我知道如何使用策略设置,我只想知道队列的当前模式 当模式在声明时设置,并且 通过政策 .

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/37852
 
885 次点击  
文章 [ 2 ]  |  最新文章 4 年前
Grzesiek Danowski
Reply   •   1 楼
Grzesiek Danowski    5 年前

使用Managament插件,我创建了一个懒惰模式的新队列:

然后我可以看到模式已经设置:

这是错的吗?

然后我可以看到模式已设置:

show queue properties

这是错的吗?

Gabriele
Reply   •   2 楼
Gabriele    5 年前

您可以使用HTTP API执行此操作: 例如,具有所有属性的队列列表:

curl  -u guest:guest 'localhost:15672/api/queues'

你必须找到:

"mode": "lazy"

"arguments": {
            "x-queue-mode": "lazy"
        },

简单地说:

curl  -u guest:guest \
    'localhost:15672/api/queues' | python -m json.tool | grep '"mode": "lazy"' -A 50 -B 10

curl  -u guest:guest \
    'localhost:15672/api/queues' | python -m json.tool | grep '"x-queue-mode"' -A 80 -B 3

或者用某种语言。