Use schema registry in Java with Aiven for Apache Kafka®
Aiven for Apache Kafka® provides the schema registry functionality via Karapace, including the possibility to store, retrieve a schema, and also evolve it without needing to rebuild existing Consumers and Producers code.
To use the schema registry functionality exposed by Karapace, you need to enable the Schema Registry (Karapace) functionality for the Aiven for Apache Kafka instance selected from the Aiven console, service Overview tab.
To use schema registry:
- Create version 1 of a schema
- Use Apache Avro to compile the schema
- Create consumer and producer that utilize Aiven for Apache Kafka and Schema Registry
Prerequisites
To be able to produce and consume data in Java from an Aiven for Apache Kafka service, create a Keystore and Truststore containing the SSL certificates.
You can do it manually by downloading the certificates and composing the files locally on your machine or using the dedicated Aiven CLI command.