1

I'm using EasyNetQ.ManagementClient nuget package for getting some stats on the rabbit. In the Web Management you can see the msg rates per queueenter image description here

But I can't get the same rates just for queues in code when using EasyNetQ.ManagementClient, is it possible to get them?

var managementClient = new ManagementClient("http://ipadress", "guest", "guest");
var overview = managementClient.GetOverview();
var publishRate = overview.MessageStats.PublishDetails.Rate; // this is for all queues together
var queues = managementClient.GetQueues();
foreach (var q in queues)
{ 
  // q doesn't have any rates properties
}

Thanks in advance

Piotr W
  • 631
  • 7
  • 17
Margo
  • 672
  • 3
  • 13
  • 30

2 Answers2

1

I haven't figure this out but insted of using EasyNetQ.ManagementClient nuget package I do a web request to rabbit's api on http://ipadress:15672/api/queues and get JSON back in response with all the information that I need.

Stephen Byrne
  • 7,400
  • 1
  • 31
  • 51
Margo
  • 672
  • 3
  • 13
  • 30
0

Maybe it was not present in the API back when you asked the question, but with latest EasyNetQ.Management.Client you can now query statistics per queue:

...
foreach (var q in queues)
{ 
  Console.WriteLine($"Rate for {q.Name} is {q.MessagesDetails.Rate}");
}
Mugen
  • 8,301
  • 10
  • 62
  • 140