Getting number of messages in a RabbitMQ queue
问题 We're using amqplib to publish/consume messages. I want to be able to read the number of messages on a queue (ideally both acknowledged and unacknowledged). This will allow me to show a nice status diagram to the admin users and detect if a certain component is not keeping up with the load. I can't find any information in the amqplib docs about reading queue status. Can someone point me in the right direction? 回答1: Using pika: import pika pika_conn_params = pika.ConnectionParameters( host=