We need to monitor queue receiver's health every 5 minutes. Do we have any API to get the information about the last receive/peek operation performed on a Service bus queue? There is a 'AccessAt' property but that represents the time at which last operation was done (publish/receive/peek), which is not useful in my case. Any ideas (apart from setting up monitoring on each receiver)?
Asked
Active
Viewed 107 times
0
-
Have a look at this answer: http://stackoverflow.com/a/38501539/4167200 – Thomas Dec 21 '16 at 20:30
1 Answers
0
This is more of an auditing feature for the service than a stat. Currently not available. Your endpoints could emit that info as messages. Keep in mind that then it's not exactly the same server time (1) fire all those messages and individual messages might fail when sent (2).

Sean Feldman
- 23,443
- 7
- 55
- 80
-
I was planning to use audit messages send to each queue every 5 minutes as a mechanism to see if at least one receiver is actively retrieving message. But this is not fool proof as it requires some CPU time on the receiver end (which, I was trying to avoid), also the message can fail thereby breaking the chain of messages. Also it may not be exactly 5 minute interval, if all the receivers are busy for more than 5 minutes (which is same in the case of AccessAt method). I don't know if you meant the same? – Abhilash Dec 19 '16 at 03:43
-
"I was planning to use audit messages send to each queue every 5 minutes as a mechanism to see if at least one receiver is actively retrieving message" - rather than doing that, perhaps would be better to monitor queue depth. Have a look at http://www.servicebus360.com/ – Sean Feldman Dec 19 '16 at 05:03
-
Yes, later I decided to go with a combination of 'AccessedAt', 'incoming' and 'outgoing' counts (metrics) to determine if someone actively accessing the queue. One downside of this approach is that if the clients are taking longer to process current messages, then it will report wrong value. I am wondering if we could use 'requests.total' to see if there was any activity from receiving clients. Any idea? – Abhilash Dec 21 '16 at 03:46