fbpx

How to effectively monitor Azure Service Bus Queues

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.  Netreo, our flagship Azure monitoring and automation service, is used to illustrate some 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 through Azure native auto-scaling functionality or Netreo‘s auto-scaling engine.
  • Better architecture.  ASB Queues allow for decoupling of sub-systems from each other. Communication through 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, the 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 there are just enough of them, and they are keeping up with messages
Azure Service Bus Queue details in Netreo
Azure Service Bus Queue details on Netreo dashboard

Third party solution for monitoring and automation

Netreo 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

  • Netreo 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 Netreo users when Azure Service Bus namespace or its queues are no longer generally available.
  • Netreo tracks, visualizes and alerts on deadletters and transferred deadletters for ASB 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 ASB Queues with Netreo can learn here about how to create this alert in their already configured environments.
  • Netreo 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 Netreo 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.

Netreo users can start monitoring Azure Service Bus in just a few minutes

Add Azure Service Bus Queues resource to Netreo monitoring profile
Add ASB Queues resource to Netreo monitoring profile

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

Netreo 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 Netreo website.

Find Out how Netreo delivers value and automates common and frequent Azure Monitoring and Automation tasks. Request a Demo Today!

Ready to get started? Get in touch or schedule a demo.