Producing specific avro messages to kafka topic #311
|
Hello, |
Replies: 2 comments 5 replies
|
You will not find examples here as it is dependent on your Kafka lib, which is an opinionated topic. A schema registry client is provided in this package: https://pkg.go.dev/github.com/hamba/avro/v2@v2.16.0/registry so you do not need to implement that, but you may should you choose. |
|
Hi, |
You will not find examples here as it is dependent on your Kafka lib, which is an opinionated topic.
What your are looking for however can be found in this guide: https://medium.com/slalom-technology/introduction-to-schema-registry-in-kafka-915ccf06b902
and the wire format can be found here: https://docs.confluent.io/platform/current/schema-registry/fundamentals/serdes-develop/index.html#wire-format
A schema registry client is provided in this package: https://pkg.go.dev/github.com/hamba/avro/v2@v2.16.0/registry so you do not need to implement that, but you may should you choose.
Gos binary package can be used to encode the schema ID: https://pkg.go.dev/encoding/binary#example-ByteOrder-Put