What is Azure Event Grid?
It is a service in Azure, which is used to connect applications together through event messaging. It helps to build an event-based architecture for the application. It sends notifications through HTTP requests and allows you to choose the Azure service or resource that you want to be notified about. These notifications contain events that happen in the publisher. It enables event management like blob storage, functions, logic apps, etc across different Azure resources.
Azure Event Grid is an event managed routing platform that enables you to react in real-time to changes that are happening in your applications hosted in Azure resources.
Before using, we have to understand the primary concepts of the Azure event grid to use it effectively.
Events – An event describes what is happening in the system. Here are some examples of events: Order Created, Order Shipped, File deleted, etc. Generally, an event has two blocks of information. One block is general information (generic information such as Event identifier, source of the event, time the event took place, etc) which may be common across all events. The second block is specific information (order created event may contain order details) to the event. An event is limited to 64KB.
Event source – An event source is where the event happened. It is the origin of an event that was then handled by Event Grid. Azure Event Grid supports multiple event sources such as Azure Blob Storage, Azure IOT Hub, Azure Service Bus, Container Registry, Azure Event Hubs, etc. Many more event sources are being added frequently. It is also possible to publish your own custom events directly to an Event Grid endpoint using Custom topics.
Event handlers – An event handler process an event. Azure Event Grid will forward events to event handlers, where they will be deserialized and processed. An event can be processed by single or multiple event handlers. An event handler can be designed as a Webhook, Azure Automation, Azure Functions, Logic Apps, Event Hubs, or Microsoft Flow.
Event subscriptions – A subscription is a channel between Azure Event Grid and a service. This channel is used to retrieve events from the grid. You publish a message to a topic and then subscribe to it with your consumer.
Capabilities Of Azure Event Grid
- Simplicity – Point and click the events to an event handler from Azure.
- Filtering – Event handlers only receive relevant events and there is no unnecessary data on event type or publish path.
- Fan-out -Send copies of the event to as many places and subscribe to several events.
- Reliability – Event Grid takes 30 seconds for a response. After delivering a message, if the endpoint hasn’t responded within 30 seconds, the message is queued for retry. Event Grid uses an exponential backoff retry for 24 hours.
- High throughput – Workloads on Grid builds will support millions of events per second.
- Events – Get up and runs quickly with resource-defined built-in events.