-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement support of Schema Registry's schema references #48
Comments
@FrancescoPessina Hey, thanks for bringing it up. In short – Avrora supports Inter-Schema references, so you can refer to nested schemas. In case when a writer has local schema files it should be possible to find it. And in the case when a reader gets the schema the nested one should be present inside the top-level schema. I didn't read how does that new CSR functionality work yet. As I understand the issue happens when you receive a message encoded with a schema containing the reference, which schema is not present in the message schema, right? |
@Strech Hello and thanks for your response. The new CSR functionality enables the "reference" from an Avro schema to another, without "copying" it entirely into the schema.
So when Avrora finds the items with type I pushed a PR which solves this, pulling the reference schema from CSR and inserting it into the parent schema json. |
Closed via #50 |
Description
When consuming an Avro message with a schema which has a schema reference, the
Avrora.decode/1
function fails with{:error, {:not_found, "type"}}
.Schema references is a new feature introduced in Confluent Platform version 5.5.0 (see here https://www.confluent.io/blog/multiple-event-types-in-the-same-kafka-topic/#avro-unions-with-schema-references)
How to reproduce
Given a schema containing a schema reference registered into the schema registry, such as:
Nested schema:
Schema with reference:
Try to consume and decode a message produced with
AvroTest
schema.I tried with Avrora
v0.13.0
.The text was updated successfully, but these errors were encountered: