In this course, we explore three Azure messaging services: Azure Event Grid, Azure Event Hubs, and Azure Service Bus, and what they are used for.
- Gain a good understanding of what these three Azure messaging services are, and how they are used.
- Those who wish to learn what Azure Event Grid, Azure Event Hubs, and Azure Service Bus are, and what they are used for.
- Basic familiarity with Azure
- Basic familiarity with distributed apps
Welcome to Azure Service Bus.
In this lecture, we’ll explore what Azure Service Bus is, how it decouples applications and services from each other, the benefits of using messaging to transfer data between different applications and services, and common messaging scenarios. We will also take a closer look at Service Bus queues and topics, including their features, how they work, and the advantages of using them. Additionally, we will discuss namespaces, which serve as containers for messaging components, and how they relate to Service Bus.
Azure Service Bus is a fully managed enterprise message broker with message queues and publish-subscribe topics. It's designed to decouple applications and services from each other, providing benefits such as load-balancing work across competing workers, safely routing and transferring data and control across service and application boundaries, and coordinating transactional work that requires a high degree of reliability.
To transfer data between different applications and services, messages are used. A message is a container decorated with metadata, and it contains data. The data can be any kind of information, including structured data encoded with common formats like JSON, XML, Apache Avro, or plain text. There are many common messaging scenarios, such as transfer of business data (such as sales or purchase orders, journals, or inventory movements), improving reliability and scalability of applications and services by decoupling them, load balancing, allowing for multiple competing consumers to read from a queue at the same time, enabling 1:n relationships between publishers and subscribers using topics and subscriptions, implementing high-scale coordination of workflows and multiplexed transfers that require strict message ordering or message deferral using message sessions, and performing transactions.
In Azure Service Bus, messages are sent to and received from queues. Queues store messages until the receiving application is available to receive and process them. Messages in queues are ordered and timestamped on arrival. Once accepted by the broker, the message is always held durably in triple-redundant storage, spread across availability zones if the namespace is zone-enabled. Messages are delivered in pull mode, only delivering messages when requested. Unlike the busy-polling model of some other cloud queues, the pull operation can be long-lived and only complete once a message is available.
Topics can also be used to send and receive messages. While a queue is often used for point-to-point communication, topics are useful in publish/subscribe scenarios. Topics can have multiple independent subscriptions, which attach to the topic and otherwise work exactly like queues from the receiver side. A subscriber to a topic can receive a copy of each message sent to that topic. Subscriptions are named entities and are durable by default, but can be configured to expire and then be automatically deleted. Via the Java Message Service (JMS) API, Service Bus Premium also allows you to create volatile subscriptions that exist for the duration of the connection. You can define rules on a subscription, which have a filter to define a condition for the message to be copied into the subscription and an optional action that can modify message metadata.
A namespace is a container for all messaging components, including queues and topics. Multiple queues and topics can be in a single namespace, and namespaces often serve as application containers. A namespace is your own capacity slice of a large cluster made up of dozens of all-active virtual machines. It may optionally span three Azure availability zones, so you get all the availability and robustness of running the message broker at enormous scale. You don't need to worry about underlying complexities.
The key takeaways for Azure Service Bus are that it is a fully managed enterprise message broker that allows you to decouple applications and services from each other, providing benefits such as load balancing, safely routing and transferring data, and coordinating transactional work. Messaging is the process of transferring data between different applications and services using messages. Common messaging scenarios include messaging, decoupling applications, load balancing, topics and subscriptions, transactions, and message sessions. Queues store messages until the receiving application is available to receive and process them, while topics are useful in publish/subscribe scenarios. Namespaces are containers for all messaging components, and multiple queues and topics can be in a single namespace, often serving as application containers.
Tom is a 25+ year veteran of the IT industry, having worked in environments as large as 40k seats and as small as 50 seats. Throughout the course of a long an interesting career, he has built an in-depth skillset that spans numerous IT disciplines. Tom has designed and architected small, large, and global IT solutions.
In addition to the Cloud Platform and Infrastructure MCSE certification, Tom also carries several other Microsoft certifications. His ability to see things from a strategic perspective allows Tom to architect solutions that closely align with business needs.
In his spare time, Tom enjoys camping, fishing, and playing poker.