Handling a custom event

Before we send a custom event, we have to take a look at the Event Grid event schema:

[  {    "topic": string,    "subject": string,    "id": string,    "eventType": string,    "eventTime": string,    "data":{      object-unique-to-each-publisher    },    "dataVersion": string,    "metadataVersion": string  }]

As you can see, it is a simple JSON array, containing many different events. Let's describe each field here:

  • topic: This defines a full path to an event source (for example, Azure Blob Storage).
  • subject: This defines a path to an event subject (so, in the case of publishing events from a resource group, this could be a full path to an Azure resource, or, in the case of Azure Blob Storage, this would be a Blob path).
  • id: This is the unique identifier ...

Get Hands-On Azure for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.