Event Grid
  • 24 Jun 2022
  • 6 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Event Grid

  • Dark
    Light
  • PDF

Introduction

Event Grid is a fully managed event service that enables you to easily manage events across many different Azure services and applications. Made for performance and scale, it simplifies building event-driven applications and serverless architectures.

Associate an Event Grid Subscription to a Business Application in Serverless360.

Event Grid Subscription

  • Event Grid Subscription informs Event Grid about which events on a specific topic users want to be notified about.

  • Customers provide an endpoint for handling the event when they create the Subscription.

  • The events sent to the endpoint can be filtered.

Accessing failed events of Event Grid Subscription

  • Azure Event Grid is used to build event driven architectures. Event Grid Topics and Event Grid Subscriptions are involved in event publishing and subscribing to the events.

  • For any reason, if the Event Grid Subscription fails to receive the events, there is a Dead-Lettering mechanism available to capture the failed events. Unlike the Service Bus Dead-Lettering, Event Grid stores the failed events in a Storage Blob Container.

  • Consider a scenario where the destination resource of the Event Grid Subscription is a Service Bus Queue and an Azure Function listens for the messages from the Queue. If the Queue is deleted accidentally, the events would fail and eventually get stored in a Storage Blob Container configured at the time of the creation of the Event Subscription.

  • Serverless360 provides a user interface to access the failed events of the Event Grid Subscription from the configured Blob Container. This will help to rectify the problem and keep track of the failed events.

Storage Blob Container that acts as the Dead-Letter destination of the Event Grid Subscription should be associated with the same Business Application to access and process the Dead-Lettered events.

  • It is possible to view the event content with basic properties along with the Dead-letter reason.

Dead letter events.gif

Processing dead-letter events of Event Grid Subscription

  • Consider a scenario where the endpoint configured to an Event Grid Subscription was down for an hour and the events sent to it from the Event Grid Topic have been dead-lettered. Now when the endpoint is available to receive the events there may be a need to reprocess the dead-lettered events of the Event Grid Subscription.

  • This can be achieved using Serverless360. The dead-lettered events can either be resubmitted or repaired and resubmitted to the Event Grid Topic.

Pre-requisites

Event Grid Subscription Dead-Letter event processing is only possible if the following conditions are met:

  • The Event Grid Subscription must be configured with a custom Event Grid Topic.

  • The Storage Account Container configured as Dead-Letter destination of the Event Grid Subscription must have public anonymous access either to the container or to its blobs.

Resubmit dead-lettered events

  • Once an Event-Grid Event is dead-lettered, there comes a need to resubmit the dead-lettered event back to the Event Grid Topic.

  • Serverless360 allows resubmitting single as well as a bulk of dead-lettered events.

  • Resubmitting the dead-lettered event preserves all the properties of the Event Grid Event like Id, Subject, Event Type, Event Time, Data Version, Metadata Version, and Event Data.

Resubmit Dead letter events.gif

Repair and Resubmit dead-lettered events

  • In case the properties of the dead-lettered event require modification, Serverless360 provides the Repair and Resubmit option.

  • For example Event time and the subject of the dead-lettered event can be modified before resubmitting it to the Event Grid Topic.

Repair and Resubmit Dead letter events.gif

Delete dead-lettered events

  • Once the dead-lettered events are processed manually either through resubmission or repair and resubmission, the dead-lettered events can be deleted from the configured dead-letter destination.

  • Serverless360 allows deleting a single dead-lettered event as well as a bulk of dead-lettered events.

Delete Dead letter events.gif

Resource Dashboard

Users now have access to a default Event Grid Subscription Dashboard within the Event Grid Subscription resource, allowing for enhanced data visualisation and tracking of real-time data.

EG Subscription.png

Users are provided with the following pre-defined Dashboard widgets, which can be customised to meet their specific needs.

1. Destination Processing Duration
2. Dropped Events vs Matched Events
3. Events Summary
4. Dead Lettered Events

Monitoring

  • Users can monitor their Event Grid Subscription resources by configuring the rules available for monitoring.

  • Navigate to the Monitoring section of the resource to configure the monitoring rules for Event Grid Subscription.

  • Users can specify monitoring threshold values based on their needs.

  • When the monitoring rule type is a metric, selecting metric against metric rules is also an option.

Monitor rules.png

Properties

  • The properties of the Event Grid Subscription can be viewed in Serverless360.

EG Subscription - Properties.png

  • There is also an option to view the properties in JSON format.

Event Grid Topic

  • Event Grid Topics are created by the event publishers to forward the events to the destination. Event Grid Topics provide the endpoints to which the source (publisher) sends the event.

  • Azure provides some system topics which can only be subscribed by the Event Grid Subscriptions. They belong to the event publishers, which are mainly the Azure services like Service Bus namespaces.

  • Custom Event Grid Topics can be created when the event publishers aren’t Azure services. For example, when an event must be sent to a destination (say Storage Blob Container) from a custom application we can make use of Event Grid Topics.

  • It is also possible to create multiple Event Grid Subscriptions for the same Event Grid Topic so that all the destinations receive the event published to that Event Grid Topic.

Associate the Event Grid Topic to the same Business Application to process the Dead-Letter events of the Event Grid Subscription.

Inline task in Event Grid Topic

  • In the Event Grid Topic section, users can create a really quick task to send events to the source topic that is being explored.

  • The configuration created to run immediately can also be saved for future use in the Automated Tasks section.

Inline task to send events

This feature allows users to quickly send events to Event Grid Topic by providing the following inputs:

  • Event Data count
  • Event Type
  • Subject
  • Data Version
  • Configuration name (if Save configuration is enabled)

The following illustration shows sending 10 events to the Event Grid Topic.

EG Topic -inline task.gif

Task status can be viewed by navigating to the Automated Tasks section and switching to the Task history tab.

  • Users can use this feature to quickly create a task that runs immediately.

  • Navigate to the Automated Tasks section in Serverless360 to create a task with a more detailed configuration, schedule tasks to run at a specific time, or automate the task to run on the specified hours, days, and more.

Automated task in Event Grid Topic

  • Consider a scenario where there are multiple Event Grid Subscriptions created for a single Event Grid Topic in a Business Process.

  • There may be a need to verify whether the events sent to the Event Grid Topic are received by all the Event Grid Subscriptions.

  • The Automated Task feature of Serverless360 makes it possible to accomplish all these requirements.

EG Topic -automated task.gif

Resource Dashboard

Users now have access to a default Event Grid Topic Dashboard within the Event Grid Topic resource, allowing for enhanced data visualisation and tracking of real-time data.

Event Grid Topic.png

Users are provided with the following pre-defined Dashboard widgets, which can be customised to meet their specific needs.

1. Destination Processing Duration
2. Published Events vs Publish Failed Events
3. Events Summary
4. Publish Failed Events

Monitoring

  • Users can monitor their Event Grid Topic resources by configuring the rules available for monitoring.

  • Navigate to the Monitoring section of the resource to configure the monitoring rules for Event Grid Topic.

  • Users can specify monitoring threshold values based on their needs.

  • When the monitoring rule type is a metric, selecting metric against metric rules is also an option.

Monitor rules.png

Properties

  • Users can view the properties of the Event Grid Topic in Serverless360.

EG Topic - Properties.png

  • There is also an option to view the properties in JSON format.

Was this article helpful?