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.
The following features have been released with our 2023-06-01-preview API:
- MQTT v3.1.1 and v5.0 support (preview)
- Pull-style event consumption using HTTP (preview)
The initial regions where these features are available are: East US, Central US, South Central US, West US 2, East Asia, Southeast Asia, North Europe, West Europe, UAE North
The MQTT Messaging and Pull Delivery features along with the following resources are currently in PREVIEW.
- Namespace topics
- Event subscriptions to namespace topics
- Topic spaces
- Client Groups
- Permission Bindings
Azure Event Grid is used at different stages of data pipelines to achieve a diverse set of integration goals.
MQTT messaging (preview). 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 (preview) 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 configuring Event Grid for 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 messaging (preview)
- 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 the standard mechanism for device authentication in the IoT industry.
- 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 (preview) 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.
The MQTT support in 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.
Event Grid’s MQTT support 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 Webhooks through the HTTP Push delivery functionality. 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.
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 multi-tenant 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 Azure AD, 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.
How much does Event Grid cost?
Azure Event Grid offers two tiers and uses a pay-per-use pricing model. For details on pricing, see Azure Event Grid pricing. To learn more about the capabilities for each tier, see Choose the right Event Grid tier.