This repo provides components needed for native YANG in apache Kafka. Currently, includes the following components:
- yang-schema-registry-plugin: A plugin for Confluent's schema register
- TODO json and cbor serdes
- Download and configure Confluent platform: see https://docs.confluent.io/platform/7.5/installation/installing_cp. For
the purpose of this documentation, we denote the installation dir of Confluent's platform as
${CONFLUENT_DIR}
- build the current project
mvn package
- Copy the yang-schema-registry-plugin-0.1-shaded.jar to Confluent's schema registry java libs directory
cp yang-schema-registry-plugin/target/yang-schema-registry-plugin-0.1-shaded.jar ${CONFLUENT_DIR}/share/java/schema-registry/
- Enable the yang schema plugin by added the line
schema.providers=com.swisscom.kafka.schemaregistry.yang.YangSchemaProvider
to${CONFLUENT_DIR}/etc/schema-registry/schema-registry.properties
echo 'schema.providers=com.swisscom.kafka.schemaregistry.yang.YangSchemaProvider' >> ${CONFLUENT_DIR}/etc/schema-registry/schema-registry.properties
- Restart the schema registry. When the plugin is loaded successfully, a log containing the message
[ INFO] - io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry -KafkaSchemaRegistry.java(272) -Registering schema provider for YANG: ch.swisscom.kafka.schemaregistry.yang.YangSchemaProvider
is printed