intiha
intiha

Reputation: 319

Avro messages with schema

So we are planning to use Avro for communication over a confluent kafka-based ecosystem. My current understanding of Avro is that each message carries its schema. If that is the case, we need schema registry just for resolving version updates?

I ask since carrying the schema with each message prevents the need for something like a schema registry to map a message id to a schema. Or am I missing something here?

Upvotes: 1

Views: 1182

Answers (1)

Hans Jespersen
Hans Jespersen

Reputation: 8335

When you run the Confluent Schema Registry, the Kafka messages published with the Confluent Avro Serdes library do not contain the avro schema. They only contain a numeric Schema id that is used by the consumers deserializer to fetch the Schema from the Confluent Schema Registry. These schemas are cached by the serializer and deserializer as a further performance optimization.

Upvotes: 3

Related Questions