-
Notifications
You must be signed in to change notification settings - Fork 52
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
Consider supporting uploads to Kafka schema registry #27
Comments
So this would be an explicit command? Should we also store the schema version or would only the registry do that? |
Yeah, I suppose that it would mirror the |
Not sure about storing locally tho. Nor I am I currently well-versed on version through the registry. I like "simple", but maybe it will be a technical necessity? I'm also not sure if the task should be manual or tacked on to |
the way I am using it to upload a schema after I generated it from my .idl file, that points out that another useful piece would be to add the transformation idl -> avsc to the methods of sbt-avrohugger. the schema version is automatically assigned by the registry. |
So the schema registry only reads avsc? In a team setting, how do you control which schema (latest in version control) corresponds to which version in the registry? That's why I asked about storing the version locally as well. Especially when we also want to support downloading schemas off the registry. I'd also be interested in how the versions are handled later on, when you read a message off Kafka, how do you know which version the schema adheres to? |
Yes, the schema server wants AVSC, that is the reason why it would be really interesting if I could support the transformations via sbt-avrohugger: I edit the .idl the way it works is that each kafka topic is associated to a specific schema and schema id by the schema server. The id is globally unique (i.e. the id matches a schema and a version) and each message contains the schema id that has been encoded with. But reading from the queue works in this way: In my projects I keep separate writers from readers: when i want to use a topic I use my extension to sbt-avrohugger to re-generate the scala classes from the schema server every time I rebuild the project, I do not rely on the idl file that I maintain in the writer project: they communicate only though the schema server. |
I also implemented a task that converts avro IDL to AVSC and copies the top class to the source directory:
this bring in a dependency on "org.apache.avro" % "avro-tools" % "1.8.1", |
draft courtesy of @xelax: https://gitter.im/julianpeeters/avrohugger?at=57c732e129ee4a6705812df9
The text was updated successfully, but these errors were encountered: