DoubleCloud Managed Service for Apache Kafka® uses Karapace to standardize the message structure.
Schema examples
Here is an example of a Reservation object with name and number of persons represented in all the supported schema formats. All the fields are required.
All the versions of your schema need to be backwards-compatible. This means that you must be able to correctly apply the previous version of the schema to the current data.
For example, these schema iterations are compatible. The v2 schema includes all the fields from the v1, and adds a new optional field after. Consumers using the new schema can read data written by producers using the latest registered schema:
Below is an example of incompatible versions. Now the added field is required. This won't allow to read incoming messages by applying the previous version of the schema. Thus, it'll return an error, and the new version of the schema wouldn't apply:
To send requests to Schema Registry, you must use the basic access authentication . Specify the username and password of the Apache Kafka® user using the Authorization header.
To get the username and password for your Apache Kafka® cluster: