Azure Service Bus (ASB) is a critical component of Microsoft Azure cloud platform.  Using ASB Queues, applications can communicate with each other by sending messages instead of performing direct API calls.  ASB Queues often serve as a core communication framework that glues the overall architecture together.

It is vital that proper monitoring and automation of Azure Service Bus Queues is in place.  This short article provides a brief overview of ASB Queues and highlights 4 activities that every IT administrator should consider after deploying a solution with ASB queues.  CloudMonix, our flagship Azure monitoring and automation service, is used to illustrate some of the examples.

Utilizing Azure Service Bus Queues provides a number of benefits

  • Increased scalability.  Web servers can offload workloads to workers (like Azure Worker Roles or Web Jobs) by queueing up messages. This frees up Web servers to process web requests efficiently and provides for auto-scaling of Web and Worker Roles independently thru Azure native auto-scaling functionality or CloudMonix‘s auto-scaling engine.
  • Better architecture.  Azure Service Bus Queues allow for decoupling of sub-systems from each other. Communication thru queues rather than direct calls allows for easy and independent refactoring and substitution of sub-systems
  • More reliable communication.  Once a message is placed in the queue, worker processor will be able to pick it up when it is ready. In contrast, with direct API communication method, if worker is not ready to process the job, client simply fails the call.

 

4 tasks to perform when utilizing Azure Service Bus queues

  • Monitor that queues are up and ready to receive messages
  • Be alerted when messages are getting dead-lettered
  • Monitor that depletion of messages is occurring properly
  • Auto-scale workers, so that that there are just enough of them and they are keeping up with messages
ASB Queue details in CloudMonix

ASB Queue details on CloudMonix dashboard

 

Third party solution for monitoring and automation

CloudMonix allows Azure Service Bus administrators to easily visualize queue statistics, get notified when things go wrong and auto-scale their workers when queues begin to fill up or deplete

  • CloudMonix tracks a special ResourceStatus metric that checks for general availability of the Azure Service Bus namespace and queues in it.  Default monitoring profile that is installed by setup wizard, contains an alert that will notify CloudMonix users when Azure Service Bus namespace or its queues are no longer generally available.
  • CloudMonix tracks, visualizes and alerts on deadletters and transferred deadletters for Azure Service Bus queues. Default monitoring profile contains an alert that fires when deadletters are found in any of the queues within a Service Bus namespace.  This is a new alert that was introduced at the time this blog entry was written.  Users who are currently monitoring their Azure Service Bus queues with CloudMonix can learn here about how to create this alert in their already configured environments.
  • CloudMonix can ensure that queues are being depleted quickly by keeping track of age of the next message to be processed and alerting when age of messages gets old.  This is easily done by tracking the age of next message in the queue and alerting if that age is older than expected.  Learn more here.
  • Users that are utilizing CloudMonix for auto-scaling will find that they can consume Azure Service Bus metrics in their auto-scaling logic thru functionality called Linked Metrics. Learn more about linked metrics here.

 

After registration for CloudMonix free account, users can start monitoring Azure Service Bus in just a few minutes

Add ASB Queues resource to CloudMonix monitoring profile

Add ASB Queues resource to CloudMonix monitoring profile

 

Example of an alert that CloudMonix sends when it detects deadletters in any of the queues it is tracking

CloudMonix alert for ASB queue deadletters

CloudMonix alert for ASB queue deadletters

Azure Service Bus Queues are an amazing and powerful messaging platform.  Learn how you can monitor and automate it and other Azure services by visiting CloudMonix website.