Skip to content

Producing specific avro messages to kafka topic #311

Answered by nrwiersma
theseeker58 asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by theseeker58
Comment options

You must be logged in to vote
5 replies
@nrwiersma
Comment options

@theseeker58
Comment options

@nrwiersma
Comment options

@theseeker58
Comment options

@nrwiersma
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants