About Event schema types in event subscription

Bexy Morgan 260 Reputation points
2023-08-13T21:24:45.1966667+00:00

What is the difference between below mentioned different event schema types and when to use which event schema type while in creating event subscription?

User's image

Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
379 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,811 Reputation points Microsoft Employee
    2023-08-14T01:46:41.66+00:00

    Hello @Bexy Morgan - Thanks for reaching out!

    Both schemas are a means to serve the same purpose & goal which is to define a specific format for the event data. Some of the main differences are as follows:

    • The Event Grid Schema is well-supported by Azure services and is a proprietary format defined by Microsoft.
    • The Cloud Schema is an open-source project being actively developed & is more of a future-proof option, its collaborators include Microsoft.
    • Because they are different schemas, they carry different data points in describing your event data. This is an important technical detail that needs to be reviewed thoroughly against a project spec.
    • CloudEvent Schema is usually chosen for interoperability between different event publishers and subscribers. It provides a standard way to describe events and their context, making it easier to integrate with other systems.
    • Custom Schema is great for when you need to define a custom event schema that is specific to your application or service. You can define the schema using JSON or Avro, and then use it to send events to subscribers.
    • Event Grid Schema, on the other hand, is used for events that are generated by Azure services and are sent to Event Grid. It provides a standard way to describe events and their context, making it easier to integrate with other Azure services.

    Note that they can both be used together where one schema is for event inputting and the other for event outputting. I recommend going through the docs for each of them:

    The way I personally think about it when choosing between the 2 schemas is as follows: If just getting started on a new project, I'd go with the Cloud Schema option which is the Microsoft recommended option -- I would carefully validate the data points in the schema and make sure it contains all the information needed for my project. However, if what I'll be working on has rigid tech specs & requirements that entail eventing across expansive Azure-run services, I would choose the Event Grid schema option for more interoperability and reliability within Azure. I hope this helps bring clarity but if you have any further questions on the matter, just let me know in the comments below and I'd be happy to help!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.