-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
store_avro_kafka: always generate and push schema to registry
The name alone of the avro schema in the kafka registry is insufficient to match an ldms schema. A schema in the kafka registry is uniquely identified by a combination of a name and an integer ID. The schema with the same name can evolve over time, and each iteration if given new unique ID. We want to _always_ generate an avro schema, and attempt to push it to the registry. When the schema hasn't changed, the kafka registry handles the attempt to add a duplicate gracefully. The existing ID is used. But when the schema is different, the registry applies schema compatibility checks, and if they pass it updates the schema with a new ID. This patch first looks up the schema name in the registry, then generates its own schema and attemps to push it. This allows us to generate informational messages about whether the schema is new, existing, or updated/evolved.
- Loading branch information
Showing
1 changed file
with
44 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters