Event Grid
  • 12 Feb 2024
  • 7 Minutes to read
  • Dark
    Light
  • PDF

Event Grid

  • Dark
    Light
  • PDF

Article Summary

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 Turbo360.

Event Grid Subscription

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

Users 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.

Turbo360 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.

View details.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 Turbo360. 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:

  1. The Event Grid Subscription must be configured with a custom Event Grid Topic.
  2. 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.

If the event need to be resubmitted directly to an Event Grid Subscription inorder to avoid duplicated processing, the event can be posted directly to an endpoint.

Turbo360 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 Events.gif

Repair and Resubmit dead-lettered events

In case the properties of the dead-lettered event require modification, Turbo360 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.

RepairandResubmit.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.

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

Delete events.gif

Inline task in Event Grid Subscription

In the Event Grid Subscription section, users can create a really quick task to purge dead letter events from the source subscription 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 purge events

This feature allows users to quickly purge all events or a specific set of events by providing the time period.

The following illustration shows purging events created in the last 12 hours to the Event Grid Subscription:

Inlinetask.png

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

Note:
  • Users can use this feature to quickly create a task that runs immediately.
  • Navigate to the Automated Tasks section in Turbo360 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.

Resource Dashboard

A default resource dashboard is available for Event Grid Subscription resources in the Overview section, allowing for enhanced data visualization and tracking of real-time data.

Dashboards event grids subscritions.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

  1. Navigate to Event Grid Subscription -> Monitoring to configure the monitoring rules for Event Grid Subscription
  2. Select the necessary monitoring metrics and configure the threshold values
  3. Click Save

Monitors.png

The threshold values can also be provided with any metric name, defining the monitoring rule to be violated when the metric value configured at threshold field is met.

Monitoring rules will be saved for Event Grid Subscription, and the monitoring state for the metrics will be reflected after every monitoring cycle.

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.png

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

Note:
  1. Users can use this feature to quickly create a task that runs immediately.

  2. Navigate to the Automated Tasks section in Turbo360 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 Turbo360 makes it possible to accomplish all these requirements.

Send events EG Topics.gif

Resource Dashboard

A default resource dashboard is available for Event Grid Topic resources in the Overview section, allowing for enhanced data visualization and tracking of real-time data.

EG topics dashboard.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

  1. Navigate to Event Grid Topic -> Monitoring to configure the monitoring rules for Event Grid Topics
  2. Select the necessary monitoring metrics and configure the threshold values
  3. Click Save

The threshold values can also be provided with any metric name, defining the monitoring rule to be violated when the metric value configured at threshold field is met.

EG toics monitoring.png

Monitoring rules will be saved for Event Grid Topic, and the monitoring state for the metrics will be reflected after every monitoring cycle.


Was this article helpful?