Is there any way for the amqplib, of node to monitor the number of messages in the current queue?

recently tried to use rabbitmq, under node to manage using the npm package amqplib.

now there is a question, that is, after I have created a queue for rabbitmq, I want to know how much content in the current queue has not been processed through amqplib API or other ways, so as to prevent more and more content. The original intention is to sample and process the newly added content when the content in the queue exceeds a certain amount.

but amqplib has not been found to have related abilities, so I would like to ask experienced people here:

  • what is the way to view information such as the degree of accumulation of a queue in rabbitmq in a node environment? (if you don"t use amqplib, it seems possible to use the http interface that comes with rabbitmq, but it"s inconvenient, and I don"t know if it"s a good way)
  • is there any good way to deal with using rabbitmq, if I always produce faster than I consume? (I think of sampling)

Thank you! ~

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b22880-2b60a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b22880-2b60a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?