Skip to content

EventGrid

Tore Nestenius edited this page Oct 24, 2024 · 5 revisions

Event Grid Tool

Overview

The Event Grid Tool is designed to send custom events to an Azure Event Grid topic using either the Cloud Event Schema or the Event Grid Schema. This tool supports both access key-based authentication and managed identity-based authentication to connect to your Event Grid topic.

The tool alternates between sending two types of events: OrderEvent and ProductEvent. It is helpful for testing and validating Event Grid configurations and understanding how different event schemas work.

Key Features

  • Custom Event Sending: Supports sending events using the Event Grid Schema or Cloud Event Schema.
  • Flexible Authentication:
    • Supports authentication using an access key.
    • Alternatively, uses DefaultAzureCredential for managed identity or service principal-based authentication.
  • Event Alternation: Alternates between sending OrderEvent and ProductEvent to simulate different event types.

Use Cases

  • Testing Event Grid Configurations: Validate your Event Grid topic setup by sending custom events.
  • Schema Comparison: Compare the behavior and structure of events sent using Cloud Event Schema and Event Grid Schema.
  • Monitoring and Diagnostics: Ensure your events reach the Event Grid topic and observe the system’s behavior.

Creating an Event Grid Resource

Follow these steps to create a simple Event Grid resource for testing purposes:

  1. Navigate to Event Grid in the Azure Portal.
  2. Create a Custom Event Topic:
    • Under the Basics tab:
      • Name: Enter a unique name for your topic.
      • Region: Select the most appropriate region for your topic.
    • Under the Security tab:
      • Authentication: Enable authentication using SAS keys.
    • Under the Advanced tab:
      • Event Schema: Choose either Cloud Event Schema or Event Grid Schema.
      • Data Residency Type: Select Regional for data residency.
  3. Click Create to create the topic.
  4. Once the topic is created, locate and copy the Topic Endpoint (e.g., https://myeventgrid.swedencentral-1.eventgrid.azure.net/api/events).
  5. Go to Settings -> Access Keys and copy one of the access keys for later use.

Additional Resources

Clone this wiki locally