Monitor Service Bus Queue and Topic Subscription for Inactivity using ServiceBus360 | ServiceBus360 Blogs

Monitor Service Bus Queue and Topic Subscription for Inactivity using ServiceBus360

Microsoft Azure offers a highly reliable enterprise messaging service for sending and receiving messages between different applications and services. Azure takes care of all the infrastructure. Azure Service Bus is being used as an intermediary service for transferring messages in many organizations.

Service Bus contains two types of Entities that support Enterprise Messaging. They are:


Queues allow one directional communication (i.e.) Each Queue have an active sender and a receiver. The Queue holds messages sent by the sender until the messages are received by the receiver.


Topics can contain multiple Subscriptions, each Subscription acts as a separate Queue. The only difference between Queues and Subscriptions is the Subscriptions may contain filters, based on which the messages matching the filters only be received by the Subscriptions

What is ServiceBus360?

ServiceBus360 is a simple but reliable platform to manage the Service Bus entities. It provides efficient Operations, Monitoring and Analytic capabilities on any Service Bus entity. Among the capabilities, Monitoring is one of the most predominantly used offerings in ServiceBus360.

Why Monitoring?

The Azure Service Bus customers make use of the Queues and Topics for sending and receiving the messages from one service or application to another. In this case, they used to create different entities for different environments like separate Queue for Development, UAT, and Production. As the Service Bus entities are used for messaging in large scale applications, messages in large numbers are expected to be transferred through the entities across various departments like sales, billing, accounting, etc. Any problem in receiving or sending the messages in Development or UAT environments is not a big deal, but any inconvenience with transferring messages in Production environment sounds like a real problem. Things will become messy if this kind of problem arises.

Monitoring with ServiceBus360

To understand more on setting up monitoring capabilities of ServiceBus360, Please refer to Monitoring Azure Service Bus Queues and Topics using ServiceBus360 (Middleware Friday).

What is an Alarm?

In general, Alarm refers to an anxious awareness of danger. Similarly, to alert the Users, alarms are created within ServiceBus360. To create and configure an alarm in ServiceBus360, refer Basic mandatory steps to start off with monitoring Service Bus Entities – Getting started with Monitoring & Notification Channels.

Monitoring a Service Bus Queue if it is not receiving messages for sometime

Let us consider a scenario, you have a Service Bus Queue associated with some business applications where there is a huge volume of message flow. This queue is not receiving any messages or the message count is ‘0’ for a very long time say 30 minutes. This is a very unusual situation and is not expected. You need to be notified in this case. Periodically, querying your Queue or checking its properties through some means of application may be a tedious task to perform manually. How useful and efficient it would be if you receive an alert through some notification channels like email, Microsoft Teams etc.

Before you map a Queue to be monitored with an alarm, set the violation persistence duration to x minutes (min 1 & max 60 minutes) based on your requirement.

Monitoring a Service Bus Queue if it is not receiving messages for sometime

Let us monitor this Queue for this situation. Please refer to the following to configure Queue for monitoring – Monitoring Azure Service Bus Queue length using ServiceBus360.

Queue Monitoring

service bus queue monitoring

The properties available for the selected entity to be monitored will be displayed as below.

properties of the queues that have been monitored


Enable Monitoring for the ‘Active Message Count’ property. Set the Error Threshold value as ‘0 ‘ and condition as “=”. This means if the message count is equal to “0” the state will be an error.

Enable Monitoring for the ‘Active Message Count’ property

The status of the entity, monitored currently can be seen in the Monitoring Dashboard section. Which contains the issues list of the entities added for monitoring.

entity added for ServiceBus360 monitoring is in error state

Now, if the message count is not increased after x minutes as set for Threshold violation persistence at the time of alarm creation, ServiceBus360 sends an alert to the user, notifying that the entity added for monitoring is in error state.

Similarly, the Topic Subscriptions can also be monitored based on the Active Message Count Property.

Please refer the following to get started with monitoring Service Bus Topics Topic Monitoring.

Moreover, there exists many properties like Dead Letter Message Count, Size in Bytes, Status, etc. These properties can also be monitored based on the requirement of the User.

monitoring properties like Dead Letter Message Count, Size in Bytes, Status, etc

By default, the alerts are received through emails. In addition, ServiceBus360 has Introduced Notification Channels. By configuring the channels, users will start getting notifications via those channels.

Thus, we have monitored the inactivity of the Service Bus Queue with few clicks and providing few configurations. In Addition to Monitoring, there exists lot more useful features in ServiceBus360.