One or more schemas per topic when using Schema Registry with Kafka, and Avro...?
Asked Answered
S

1

6

There is somethigng I'm trying to understand about how Avro-serialized messages are treated by Kafka and Schema Registry - from this post I've understood the schema ID is stored in an predictable place in each message so it seems that we can have messages of varous schemas in the same topic and be able to find the right schema and deserialize them successfully based on just that. On the other hand I see many people seem to be using expression "a schema attached to a topic", this however implies one schema per topic..

So which is right? Can I take advantages of the Schema Registry (like i.e. KSql) and have messages of various types (or schemas) in the same topic?

Succulent answered 21/1, 2019 at 11:59 Comment(0)
T
13

Typically you have 1:1 topic/schema relationship, but it is possible (and valid) to have multiple schemas per topic in some situations. For more information, see https://www.confluent.io/blog/put-several-event-types-kafka-topic/

Theater answered 21/1, 2019 at 15:59 Comment(1)
Thanks Robin, that answers my questionSucculent

© 2022 - 2024 — McMap. All rights reserved.