Producing specific avro messages to kafka topic #311
-
Hello, |
Beta Was this translation helpful? Give feedback.
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/[email protected]/registry so you do not need to implement that, but you may should you choose. |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
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/[email protected]/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