What is Azure Event Grid?
Azure Event Grid is a highly scalable, fully managed Pub Sub message distribution service that offers flexible message consumption patterns using the MQTT and HTTP protocols. With Azure Event Grid, you can build data pipelines with device data, integrate applications, and build event-driven serverless architectures. Event Grid enables clients to publish and subscribe to messages over the MQTT v3.1.1 and v5.0 protocols to support Internet of Things (IoT) solutions. Through HTTP, Event Grid enables you to build event-driven solutions where a publisher service announces its system state changes (events) to subscriber applications. Event Grid can be configured to send events to subscribers (push delivery) or subscribers can connect to Event Grid to read events (pull delivery). Event Grid supports CloudEvents 1.0 specification to provide interoperability across systems.
Azure Event Grid is a generally available service deployed across availability zones in all regions that support them. For a list of regions supported by Event Grid, see Products available by region.
Azure Event Grid is used at different stages of data pipelines to achieve a diverse set of integration goals.
MQTT messaging. IoT devices and applications can communicate with each other over MQTT. Event Grid can also be used to route MQTT messages to Azure services or custom endpoints for further data analysis, visualization, or storage. This integration with Azure services enables you to build data pipelines that start with data ingestion from your IoT devices.
Data distribution using push and pull delivery modes. At any point in a data pipeline, HTTP applications can consume messages using push or pull APIs. The source of the data may include MQTT clients’ data, but also includes the following data sources that send their events over HTTP:
- Azure services
- Your custom applications
- External partner (SaaS) systems
When using push delivery, Event Grid can send data to destinations that include your own application webhooks and Azure services.
Event Grid offers a rich mixture of features. These features include:
- MQTT v3.1.1 and MQTT v5.0 support – use any open source MQTT client library to communicate with the service.
- Custom topics with wildcards support - leverage your own topic structure.
- Publish-subscribe messaging model - communicate efficiently using one-to-many, many-to-one, and one-to-one messaging patterns.
- Built-in cloud integration - route your MQTT messages to Azure services or custom webhooks for further processing.
- Flexible and fine-grained access control model - group clients and topic to simplify access control management, and use the variable support in topic templates for a fine-grained access control.
- X.509 certificate authentication - authenticate your devices using the IoT industry's standard mechanism for authentication.
- Microsoft Entra ID (formerly Azure Active Directory) authentication - authenticate your applications using the Azure's standard mechanism for authentication.
- TLS 1.2 and TLS 1.3 support - secure your client communication using robust encryption protocols.
- Multi-session support - connect your applications with multiple active sessions to ensure reliability and scalability.
- MQTT over WebSockets - enable connectivity for clients in firewall-restricted environments.
Event messaging (HTTP)
- Flexible event consumption model – when using HTTP, consume events using pull or push delivery mode.
- System events – Get up and running quickly with built-in Azure service events.
- Your own application events - Use Event Grid to route, filter, and reliably deliver custom events from your app.
- Partner events – Subscribe to your partner SaaS provider events and process them on Azure.
- Advanced filtering – Filter on event type or other event attributes to make sure your event handlers or consumer apps receive only relevant events.
- Reliability – Push delivery features a 24-hour retry mechanism with exponential backoff to make sure events are delivered. Using pull delivery, your application has full control over event consumption.
- High throughput - Build high-volume integrated solutions with Event Grid.
Event Grid supports the following use cases:
Event Grid enables your clients to communicate on custom MQTT topic names using a publish-subscribe messaging model. Event Grid supports clients that publish and subscribe to messages over MQTT v3.1.1, MQTT v3.1.1 over WebSockets, MQTT v5, and MQTT v5 over WebSockets. Event Grid allows you to send MQTT messages to the cloud for data analysis, storage, and visualizations, among other use cases.
Event Grid integrates with Azure IoT MQ to bridge its MQTT broker capability on the edge with Event Grid’s MQTT broker capability in the cloud. Azure IoT MQ is a new distributed MQTT broker for edge computing, running on Arc enabled Kubernetes clusters. It's now available in public preview as part of Azure IoT Operations.
The MQTT broker feature in Azure Event Grid is ideal for the implementation of automotive and mobility scenarios, among others. See the reference architecture to learn how to build secure and scalable solutions for connecting millions of vehicles to the cloud, using Azure’s messaging and data analytics services.
Azure Event Grid’s MQTT broker feature enables you to accomplish the following scenarios.
Ingest IoT telemetry
Ingest telemetry using a many-to-one messaging pattern. For example, use Event Grid to send telemetry from multiple IoT devices to a cloud application. This pattern enables the application to offload the burden of managing the high number of connections with devices to Event Grid.
Command and control
Control your MQTT clients using the request-response (one-to-one) message pattern. For example, use Event Grid to send a command from a cloud application to an IoT device.
Broadcast alerts to a fleet of clients using the one-to-many messaging pattern. For example, use Event Grid to send an alert from a cloud application to multiple IoT devices. This pattern enables the application to publish only one message that the service replicates for every interested client.
Integrate MQTT data
Integrate data from your MQTT clients by routing MQTT messages to Azure services and custom endpoints through push delivery or pull delivery. For example, use Event Grid to route telemetry from your IoT devices to Event Hubs and then to Azure Stream Analytics to gain insights from your device telemetry.
Push delivery of discrete events
Event Grid can be configured to send events to a diverse set of Azure services or webhooks using push event delivery. Event sources include your custom applications, Azure services, and partner (SaaS) services that publish events announcing system state changes (also known as "discrete" events). In turn, Event Grid delivers those events to configured subscribers’ destinations.
Event Grid’s push delivery allows you to realize the following use cases.
Push delivery of discrete events is available in Event Grid basic tier and Event Grid standard tier, to learn more about the differences see choose the right Event Grid tier for your solution.
Build event-driven serverless solutions
Use Event Grid to build serverless solutions with Azure Functions Apps, Logic Apps, and API Management. Using serverless services with Event Grid affords you a level of productivity, effort economy, and integration superior to that of classical computing models where you have to procure, manage, secure, and maintain all infrastructure deployed.
Receive events from Azure services
Event Grid can receive events from 20+ Azure services so that you can automate your operations. For example, you can configure Event Grid to receive an event when a new blob has been created on an Azure Storage Account so that your downstream application can read and process its content. For a list of all supported Azure services and events, see System topics.
Receive events from your applications
Your own service or application publishes events to Event Grid that subscriber applications process. Event Grid features Custom Topics to address basic integration scenarios and Domains to offer a simple management and routing model when you need to distribute events to hundreds or thousands of different groups.
Receive events from partner (SaaS providers)
A multitenant SaaS provider or platform can publish their events to Event Grid through a feature called Partner Events. You can subscribe to those events and automate tasks, for example. Events from the following partners are currently available:
- Microsoft Graph API. Through Microsoft Graph API you can get events from Microsoft Entra ID, Microsoft Outlook, Teams, Conversations, security alerts, and Universal Print.
- Tribal Group
An event subscription is a generic configuration resource that allows you to define the event handler or destination to which events are sent using push delivery. The following event handlers are supported:
- Webhooks. Azure Automation runbooks and Logic Apps are supported via webhooks.
- Azure functions
- Event Hubs
- Service Bus queues and topics
- Relay hybrid connections
- Storage queues
Pull delivery of discrete events
Azure Event Grid features pull CloudEvents delivery. Using this delivery mode, clients connect to Event Grid to read events. The following use cases can be realized using pull delivery.
Receive events at your own pace
One or more clients can connect to Azure Event Grid to read messages at their own pace. Event Grid affords clients full control on events consumption. Your application can receive events at certain times of the day, for example. Your solution can also increase the rate of consumption by adding more clients that read from Event Grid.
Consume events over a private link
You can configure private links to connect to Azure Event Grid to publish and read CloudEvents through a private endpoint in your virtual network. Traffic between your virtual network and Event Grid travels the Microsoft backbone network.
Private links are available with pull delivery, not with push delivery. You can use private links when your application connects to Event Grid to publish events or receive events, not when Event Grid connects to your webhook or Azure service to deliver events.
Regions where Event Grid namespace is available
Here's the list of regions where the new MQTT broker and namespace topics features are available:
- Australia East
- Australia South East
- Brazil South
- Brazil Southeast
- Canada Central
- Canada East
- Central India
- Central US
- East Asia
- East US
- East US 2
- France Central
- Germany West Central
- Israel Central
- Italy North
- Japan East
- Japan West
- Korea Central
- Korea South
- North Central US
- North Europe
- Norway East
- Poland Central
- South Africa West
- South Central US
- South India
- Southeast Asia
- Sweden Central
- Switzerland North
- UAE North
- UK South
- UK West
- West Europe
- West US 2
- West US 3
How much does Event Grid cost?
Azure Event Grid uses a pay-per-event pricing model. You only pay for what you use. For the push-style delivery that is generally available, the first 100,000 operations per month are free. Examples of operations include event publication, event delivery, delivery attempts, event filter evaluations that refer to event data properties (sometimes referred to as Advanced Filters), and events sent to a dead letter location. For details, see the pricing page.
Event Grid operations involving Namespaces and its resources, including MQTT and pull HTTP delivery operations, are in public preview and are available at no charge today.