Azure / amqpnetlite

AMQP 1.0 .NET Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Queue message count

pdavis68 opened this issue · comments

commented

I am working with your IContainer broker example. It mostly meets our needs for what we're doing, but one thing we need is the equivalent of Rabbit MQ's IModel.MessageCount(string queue) function.

I don't really see anything in the client or in the protocol spec that would indicate this is a built-in thing. Am I correct on this? I have no problem with implementing a custom method for this, I just want to make sure I'm not overlooking some existing functionality.

This is not part of the core spec. It would need to be a custom implementation. The recommended approach is a request response style communication on top of AMQP core messaging targeting a special node (e.g. $management) in the broker. There are proposed extensions to AMQP to do this but if interoperability is not a concern you can choose a simpler method for it.

commented

Oh, I like the special node idea. I actually took a different approach and created a "service" that managed the queues and the broker gets messages from it and separately, I have an API controller that queries the service for the queues. That seems to work for us. I'd probably re-implement with the special node notion, but the client is running low on funds and cancelling project and ours may be next, so might not get the chance.

Thanks for the response!