In the early days of Microsoft Azure, there were only a couple message queue service; Azure Storage Queue and Service Bus. This was way back in early 2010. Over the years, there have been a few different messaging and message queue services introduced into the Microsoft Azure platform. Each of these messaging services are a little different than each other and offer a pretty wide range of messaging offerings to choose from. This article walks through the primary features of each of the Microsoft Azure messaging services, and will help give you an understanding of when to use each for your own applications and enterprise scenarios.
Table of Contents
How many Messaging services?
There are many different scenarios where applications would use Messaging. This could be in Microservices, Internet of Things (IoT), Inter-Application communications, and many other scenarios where messaging makes sense to use. As a result, there are many different use cases for messaging, there are a number of messaging services that can be used within the Microsoft Azure cloud platform. But, exactly how many messaging services are there in Azure?
Here’s a list of the 7 messaging services in Microsoft Azure:
- Azure Storage Queue
- Azure Service Bus Queue
- Azure Service Bus Topic
- Azure Event Hubs
- Azure IoT Hub
- Azure Event Grid
- Azure Notification Hubs
While it would be easier if there was a single messaging service, it really is better that there are different messaging services to choose from. There is some overlap in functionality between some of the messaging services within Microsoft Azure, but each of these services are targeted towards specific messaging use cases.
Azure Storage Queue
The Azure Storage Queue is one of the original Message Queue services within the Microsoft Azure platform. It’s been around since the initial General Availability of Azure back in 2010. Enough with the history, what are the benefit of Azure Storage Queues?
Azure Storage Queues are a great option to start with for using a cloud-based Message Queue service. It’s fairly simple to integrate, and it’s also fairly cost-effective, among a other key features.
Azure Storage Queues are a great option to start with for using a cloud-based Message Queue service.
Here’s a list of the major key features to the Azure Storage Queues service:
- Support large volumes of messages
When messages are delivered to consumers, Azure Storage Queues operates in a “at least once” message delivery model. While this guarantees messages will be delivered, it also means that applications need to be designed to be tolerant of the possibility that messages are received multiple times. Generally, this doesn’t happen, but if a receiver fails to process the message without error, then the message will remain in the queue to be delivered again.
Azure Service Bus Queue & Topics
The Azure Service Bus is a set of features in Microsoft Azure that are centered around inter and intra-application messaging. This is the reason the service is called a “Bus”. Within Azure Service Bus are 2 message queue services: Queues and Topics.
Azure Service Bus Queues are simply a more robust message queue service than what is provided by Azure Storage Queues. It offers a First In, First Out (FIFO) message delivery model when sending messages to one or more competing consumers.
Azure Service Bus Topics take the same general features and scalability of Azure Service Bus Queues, but it adds on a few more advanced message queue features. The largest is the ability to implement a Publish / Subscribe messaging model. This enables a single endpoint to receive multiple types of messages, and then multiple subscriptions can be setup within the service to “subscribe” to specific message types. These subscriptions are implemented using filters that ensure messages are delivered only to those subscriptions that are filtering for them; whether a message goes to just a single subscription or is even copied out to multiple subscriptions simultaniously.
This enables a single endpoint to receive multiple types of messages, and then multiple subscriptions can be setup within the service to “subscribe” to specific message types.
Here’s a list of the major key features to Azure Service Bus Queues & Topics:
- Supports “at most” and “at least once” message delivery models
- Supports larger message volumes than Storage Queues
- Supports Publish / Subscribe messaging model
- Supports advanced messaging features, like:
- Route-based messaging
On the basic level, Azure Service Queues and Topics offer a more robust message queue option over Azure Storage Queues. Additionally, with Azure Service Bus Topics, you get a message system that works very well to implement micro services architectures by utilizing a single endpoint to publish and then subscribe to messages from the appropriate receivers via subscriptions directly within the service.
Azure Event Hubs
Azure Event Hubs is a slightly different type of message queue service when compared to Service Bus Queues, Service Bus Topics, and Azure Storage Queues. Instead of working on a 1 message in, then 1 message out at a time, Azure Event Hubs works as the font door to an event stream pipeline.
The difference with Azure Event Hubs being the front door to an event stream pipeline enables it to handle a much larger scale of messages. In fact, Azure Event Hubs can handle the ingress of millions of messages / events per second in near real-time.
Azure Event Hubs can handle the ingress of millions of messages / events per second in near real-time.
Here’s a list of the major key features of Azure Event Hubs:
- Stream millions of events per second
- Process events in real-time and batch on the same stream
The messages that flow into Azure Event Hubs are referred to as Events. The reason for this is that it’s meant to be used in a high volume, high ingress system that needs to send, receive, and process MILLIONS of events per second. Also, the way the events are handled and sent to receivers with Azure Event Hubs isn’t one at a time like with Service Bus Queues/Topics or Storage Queues. Azure Event Hubs actually exposes the events to receivers as an Event Stream that allows those receivers to read, access, process those event messages using a cursor that enables access bulk or batch access up and down the event stream.
Azure IoT Hub
Azure Event Hubs works really great for high volume ingress of event data, but it’s not the greatest for Internet of Things (IoT). For this reason, Microsoft added the Azure IoT Hub service to the Azure platform, and it’s built on the foundation of Azure Event Hubs with additional capabilities built specifically for the Internet of Things.
Like Azure Event Hubs, the Azure IoT Hub service offers a high volume event ingress service in the cloud. It also offers access to the events sent through the service as an event stream with cursor access for receivers to traverse up and down the stream. However, Azure IoT Hub adds additional IoT specific features for managing and securing large amounts of individual IoT devices as they connect to and send events through the service.
Azure IoT Hub adds additional IoT specific features for managing and securing large amounts of individual IoT devices.
Here’s a list of the major key features of Azure IoT Hub:
- Connect and manage BILLIONS of IoT devices
- Establish reliable, two-way communication between cloud and device
- Register, manage, and secure IoT devices individually with the service
Azure IoT Hub also enables bi-directional or two-way communication between the IoT devices and the cloud. Other messaging services like Storage Queue, Service Bus, and Event Hubs are all just one-way messaging; this means you can only send events / messages into the cloud. However, with Azure IoT Hub you can easily integrate command and control messaging that allows applications to send messages from the cloud directly to specific devices. This is important with IoT devices since there are instructions that often need to be sent to these devices such as configuration changes, instructions to install new firmware, and many other scenarios.
Azure Event Grid
Azure Event Grid is a messaging service built to enable event-based architectures to be built more easily. This is a messaging service that’s built with a few target uses in mind. It is similar to Azure Service Bus Topics in that it enables a publish / subscribe messaging model. However, the similarity pretty much ends there. Azure Event Grid is a cloud-native messaging service that enables event-based architectures like Microservices and Event-Driven systems to be built more easily.
Azure Event Grid is a cloud-native messaging service that enables event-based architectures like Microservices and Event-Driven systems to be built more easily.
Within your Azure Subscription, you provision an Event Grid Topic which is the endpoint that will receive Events. In Event Grid, they are called Events, not Messages since it’s a event-based messaging system. From there, you setup Subscriptions on the Topic that will receive Events. These Subscriptions are setup as an Endpoint using WebHooks or other Azure Services that will receive the Events sent to the Topic.
Here’s a list of the major key features of Azure Event Grid:
- Fully managed event routing service
- Built to support event-driven and serverless applications
Azure Event Grid is a new messaging service that is built specifically for the cloud and for event-driven architectures. It really is a “next evolution of cloud” service, similar to Azure Functions and Logic Apps with Serverless, and takes cloud-based message queues and event stream much further than the other services offer.
Azure Notification Hubs
Azure Notification Hubs is a different kind of messaging service. Rather than using to send messaged between applications or with a micro services architecture; Azure Notification Hubs is used to send Native Mobile Push Notifications from any service (within Azure, on-premises, or elsewhere) to native apps running on mobile devices (Windows, iOS, or Android).
Azure Notification Hubs is a service that’s designed so you have a single endpoint to send notifications to, then the Notification Hubs service automatically figures out how to send those notifications to specific mobile devices you’re targeting. This service provides a nice abstraction layer, since you (as the developer) do NOT need to worry about the differences of how to send push notifications to different platforms and their Push Notification Services; Microsoft (Windows), Apple (iOS), and Google (Android).
Azure Notification Hubs is used to send Native Mobile Push Notifications from any service (within Azure, on-premises, or elsewhere) to native apps running on mobile devices (Windows, iOS, or Android).
Just to clarify on what Mobile Push Notifications are… The push notifications that Azure Notification Hubs sends are NOT SMS messages or Text messages. SMS and Text messages are sent through the mobile telephone carrier. Native Push Notifications are sent through a Push Notification Service (PNS) provider for the specific mobile platform the device is running. This is the same infrastructure used to send the native, mobile push notifications you see popup with popular native apps on your smartphone or other devices, like Facebook, Twitter, Instagram, and more!
As you can see, there are MANY different messaging services available within the Microsoft Azure cloud platform. Each service has its key usage scenarios and top features. Now that you know the key features and basic differences of each of these services; hopefully you’ll know which is the best to use for the next software project or system you build or work on.
Happy messaging and eventing!