elodina / go-kafka-avro

go-kafka-avro implements Avro encoding and decoding compatible with Confluent Schema Registry.

Home Page:http://www.elodina.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Schema subject is hardcoded

andmarios opened this issue · comments

Hello, thanks for your work on avro and kafka-avro.

I noticed that when I encode a record, kafka-avro registers and checks against a schema with subject name + "-value". The name is the name set in the schema. I think the relevant line is this:
https://github.com/elodina/go-kafka-avro/blob/master/avro_encoder_decoder.go#L72

Confluent's guidelines for subjects are different though. They use topic-name + "-value" for schemas of values and topic-name + "-key" for schemas of records' keys:
http://docs.confluent.io/3.2.0/schema-registry/docs/api.html#subjects

Are there any plans to add support for such schema subjects or user defined subject names?
As it is now, it is a bit difficult to work with third party kafka applications or kafka connect.