Azure supports two types of queuing mechanism:
- Storage queues
- Service bus queues
Storage queues are part of the Azure storage infrastructure and offer a simple REST-based GET/PUT/PEEK interface. This does provide a reliable persistent messaging within and between the services.
Service bus queues are part of the enterprise offering of the Azure messaging infrastructure. As a part of the offering, it includes queues, Pub/Sub, and advanced integration patterns.
Both of these queuing technologies exist in parallel, to cater different type of use cases. Storage queues were first offered as a service to exist on top of the Azure storage service. Service bus queues came after storage queues and support wider use cases and scenarios. For example, if your components span multiple communication protocols, data contracts, trust domains, and network environments Azure Service Bus queues is the ideal solution.
There are a couple of key technical differences between Azure Storage queues and Azure Service Bus queues.
You should consider Azure Storage queues when:
- Your queue size requires over 80 GB and messages will have a lifetime of shorter than seven days.
- You are building on Azure worker roles and you want to preserve messages between worker roles crashes.
- Server-side logs are required for all transactions executed against your queues.
You should consider Azure Service Bus queues:
- When you want to be guaranteed FIFO ordered delivery.
- When your solution requires duplicate detection.
- When your (Time to live (TTL) ) can exceed more than seven days and your message sizes are greater than 80 GB.
If you would like to understand the detailed differences between Azure Storage queues versus Azure Service Bus queues, visit https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-azure-and-service-bus-queues-compared-contrasted.
Azure Service Bus messaging is an implementation message queuing concept implemented in the Microsoft Azure as a Platform as a Service (PaaS) offering. All Azure PaaS services are built with high resiliency and high availability.
In this section, we briefly reviewed Azure implements queues and Pub/Sub models. Since the goal of this book is Stream event processing, we will explore deeper into Azure Events in the next section.