An open API service indexing awesome lists of open source software.

https://github.com/zonkyio/schema-registry-compatibility-plugin

Maven plugin that performs compatibility checking of local avro schemas against remote schema registry subjects
https://github.com/zonkyio/schema-registry-compatibility-plugin

confluent-plugin schema-registry

Last synced: 7 months ago
JSON representation

Maven plugin that performs compatibility checking of local avro schemas against remote schema registry subjects

Awesome Lists containing this project

README

          

# kafka-schema-registry-compatibility-plugin

## Introduction

This maven plugin is fork / rewrite of [confluentinc's schema-registry/maven-plugin](https://github.com/confluentinc/schema-registry/tree/master/maven-plugin).
It only provides schema compatibility checking against remote schema registry. Compared to confluent's plugin, this plugins is adding several features which
would be non-trivial to add to confluent's plugin without heavy refactoring and breaking their plugin's API.

## Features

The plugin performs checks that the schema types (defined in *.avsc files in your local maven module) are compatible with same types already defined in remote
schema registry.

- You can use FileSets (ie. file path wildcards etc) when defining sources of local avro files via `schemaFileSets`. This
- All the remote subject names are fetched from remote schema registry. Once known, they're mapped (using `schemaRegistrySubjectNamePattern`) to your local
schema files.
- Every local schema is checked against all its matching remote schema registry subjects

## Process of compatibility checking

Every local schema file (as configured via `schemaFileSets`) gets checked against all matching remote schema-repository subjects. In order to find
matching subjects, full schema schema type name (extracted from local schema file) is used.

First the names of all the existing subjects are fetched from schema registry and then `schemaRegistrySubjectNamePattern` is applied to each subject in order to
extract regex group called `schematypefullname` (regex group with this name must be defined in `schemaRegistrySubjectNamePattern`). Once `schematypefullname` has
been extracted, the subject can be paired to checked local schema file.

## Typical configuration

```xml


io.zonky
kafka-schema-registry-compatibility-plugin
1.0


test-schema-compatibility
process-resources

test-compatibility



${project.basedir}/src/main/resources/avro/instalment.avsc
${project.basedir}/src/main/resources/avro/instalmentCalendarChanged.avsc


http://localhost:8081


.+)-(?.[^-]+)-value]]>



${project.basedir}/src/main/resources/avro

**/*.avsc








```