Arquillian
Arquillian

Reputation: 143

Get consumer utilisation via RabbitMQ Client API

Is there a way to get the value of the "Consumer utilisation" (as seen in the rabbitmq overview in the queues) via the RabbitMQ client? Can I ask for and react on this value via API?

Regards.

Upvotes: 0

Views: 672

Answers (2)

Mugen
Mugen

Reputation: 9095

Following will return the metric for all consumers:

rabbitmqctl list_queues name messages messages_ready state consumer_utilisation --formatter json

Or via REST api for a given queue:

curl http://guest:[email protected]:15672/api/queues/%2F/my-queue

Which gives out consumer_utilisation as one of the returned properties. Note it returns null if the value is too small. For an accurate read, use rabbitmqctl.

Upvotes: 0

Arquillian
Arquillian

Reputation: 143

I found a solution in the meantime. And I think the question is important, as it is needed for bulk and monitoring purpose. But as the question was even downvoted, I will not post an answer here. It seems it's only important to me.

Upvotes: 1

Related Questions