Difference Avro Vs Cloudevent Vs AsyncAPI | Best fit for Schema evolution and naming convention in kafka

4.4k views Asked by At

I am using confluent schema registry.

What is the difference between Avro Vs Cloudevent Vs AsyncAPI

What is the best fit for Schema evolution and naming convention in kafka ?

Can we use different schema types for different topics based on requirement ?

3

There are 3 answers

1
Lukasz Gornicki On BEST ANSWER

First of all, looking at the other answer, AsyncAPI is not a library.

CloudEvents is a specification for describing your event data AsyncAPI is a specification for defining API of your application that is part of event architecture. In simple words, it is like OpenAPI for REST

They both can coexist https://www.asyncapi.com/blog/asyncapi-cloud-events/

Avro is a binary data format for serialization and deserialization, like JSON or XML.

All of those can work together, your Avro can be encapsulated in CloudEvents enveloped and a number of them can be listed in AsyncAPI file that describes your application.

0
OneCricketeer On

CloudEvents is a specification. It does not prescribe what form the data should take

Avro is a binary data format for serialization and deserialization

AsyncAPI is library in a way that the code runs


You could use AsyncAPI to send non-blocking Avro records (that get registered to the Schema Registry) that adhere to the CloudEvents specification...


Can we use different schema types for different topics based on requirement ?

Are you having problems with this? That is how the Schema Registry works by default

0
lbroudoux On

I'd recommend having a look at AsyncAPI or CloudEvents? Both My Captain! for a detailed explanation and example of how to use them together.