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

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -