Azure Event Grid Explained

In this post I’m going to have a look at Azure Event Grid which recently entered public preview. This is a summary I put together to wrap my head around it after reading the official documentation.

First Some Terminology

  • Event Publisher – The application/service/component raising the event.
  • Event Handler –  The end consumer of the event.
  • PubSub pattern – Azure Event Hub implements the Publish-Subscribe message pattern, link here. The main benefit of this pattern is loose coupling between publishers of events and the clients consuming them. In other words the publisher of an event doesn’t have to know about each consumer of the event.
  • Topic – The endpoint for event publishers to send their events to and also the endpoint for event subscribers to subscribe to events. Also provides security, message filtering and reliable delivery.
  • Event Subscription – The mechanism used to distribute events to registered event handlers.

What does it do

Azure Event Grid is a managed event routing service. It uses a publish-subscribe model to register client web endpoints with a publisher to receive events. It is aimed at but not limited to serverless applications with built in support in Azure Functions and Azure Logic Applications. That said it supports custom events as well and any web URL can be registered as a webhook to receive events. It is built on Service Fabric to provide scalability and resilience transparently to the end user.

How does it work

Event publishers and event handlers to subscribe to a Topic. The Topic will provide the endpoint for event publishers to sent their events to and event handlers to register to receive events. The mechanism that connects event handlers to the specific events they want to handle is the Event Subscription. The Event Subscription contains the URL to the event handler which it will invoke when a matching event occurs. Event Subscriptions can filter events by type, prefix filter or suffix filter. You can add multiple strings in the filter fields by separating them with a semi colon.

Azure Event Grid

If you look at this sample event used in the quick start, you will see the eventType field used for the type filter.

Azure Event Grid

 

 

 

 

Azure Event Support

At the time of writing Azure Event Grid already exposed some Azure events like Resource Group and Subscription CRUD events. You will find them in the Event Subscriptions blade in the Azure Portal.

Azure Event Grid

Azure Logic Apps also comes with a connector for Azure Event Grid.

Azure Event Grid

Francois Delport

Published by

Francois Delport

I am a cloud and devops consultant, technology fan and previously a professional C# developer with a keen interest in system design and architecture. Currently I am involved in projects using Azure, the Microsoft stack and DevOps. I am based in Melbourne, Australia. Email: [email protected]

Leave a Reply

Your email address will not be published. Required fields are marked *