How to Check RabbitMQ Message Count

To check the total number of messages in a queue in RabbitMQ, you can use the command line tools provided by RabbitMQ or you can operate through RabbitMQ’s management interface.

Utilize the command line tool:

  1. Open the command line interface.
  2. Access the “sbin” directory in the RabbitMQ installation folder (for Windows systems) or the path to execute the “rabbitmqctl” command (for Linux systems).
  3. Run the command “rabbitmqctl list_queues name messages”. This will display the names of all queues and the total number of messages.

Manage RabbitMQ using the interface.

  1. Open your RabbitMQ management interface (typically at http://localhost:15672).
  2. Please input your username and password to log in.
  3. Click on the “Queues” tab in the left navigation bar on the page.
  4. You will see a list of all queues. In the “Messages” column, you can see the total number of messages in each queue.

You can easily view the total number of messages in RabbitMQ queues, regardless of whether you choose to use command line tools or the management interface.

bannerAds