from pyrabbit.api import Client
cl = Client('host:15672', 'guest', 'guest')
cl.get_queue('/', 'queuename')["messages"]
"""
python 统计rabbitmq 队列中的消息数量
最新推荐文章于 2023-07-22 20:15:00 发布
from pyrabbit.api import Client
cl = Client('host:15672', 'guest', 'guest')
cl.get_queue('/', 'queuename')["messages"]
"""