Marko
Marko

Reputation: 151

Check if Azure Service Bus topic is full

Is there any way to (programmatically) find out, using TopicClient class, if an Azure Service Bus Topic is full before sending message to it?

Upvotes: 1

Views: 515

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136366

When you fetch a Topic using TopicClient, you get the information about it in an object of type TopicDescription. TopicDescription has two properties: MaxSizeInMegabytes (which gives you the maximum quota for the topic) and SizeInBytes (which gives you current size of the topic). Using these two, you can determine if or not the Topic is full.

Upvotes: 1

Related Questions