I want to produce avro type message on kafka. Is there a way to use schema id registered ins schema registry instead of specifying schema ?
Asked
Active
Viewed 625 times
2 Answers
1
On previous versions you couldn't, but in the meanwhile it became possible to do so like this (as mentioned here):
kafka-avro-console-producer \
--broker-list <broker-list> \
--topic <topic> \
--property schema.registry.url=http://localhost:8081 \
--property value.schema.id=419

LeYAUable
- 1,613
- 2
- 15
- 30
0
Not really, no.
But you can download the schema from the registry given the ID, then use that to create a message.
However, if you already have an Avro object, it already has a schema and the Avro serializer will extract it for you and replace it with an ID

OneCricketeer
- 179,855
- 19
- 132
- 245