azure - How to get the unprocessed message count from a Windows Service Bus Subscription of specific type? -


i have 1 topic 1 subscription.

i'm creating messages this:

brokeredmessage messagetaska = new brokeredmessage("new task"); messagetaska.properties["type"] = "a";  brokeredmessage messagetaskb = new brokeredmessage("new task"); messagetaskb.properties["type"] = "b"; 

i have total messages, total messages of type a, total message of type b counters:

1) total of messages in subscription: subscriptiondescription desc = namespacemanager.getsubscription("topicname", "subscriptionname"); totaltask = desc.messagecount;

2) total of messages in subscription of type a: ????

3) total of messages in subscription of type b: ????

it's possible without using receive , abandon functions ? maybe using filters ?

thanks in advance rui

this not straightforward message including properties sits in serialized mode in service bus. can't view property of message unless dequeue it.

i can think of 1 method can use peeklock , check property , count , abandon it. if there 1 client other clients can't see message during time it's locked.

you can create different subscriptions instead of putting type in property.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -