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
- Host: GitHub
- URL: https://github.com/zonkyio/schema-registry-compatibility-plugin
- Owner: zonkyio
- Created: 2020-02-10T12:32:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-20T21:24:49.000Z (over 3 years ago)
- Last Synced: 2025-01-25T17:10:00.774Z (9 months ago)
- Topics: confluent-plugin, schema-registry
- Language: Java
- Size: 27.3 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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
```