简体   繁体   中英

Reuse one schema for multiple Kafka topics

I tried to search for this, but my results are always flooded with "multiple schemas per Kafka topic" entries. I'd like to know the other way round, if it may be problematic or if I could expect issues with reusing the same schema for different Kafka topics? They definitely have to be different topics for my use case (while they must always have the same schema), but I don't know if I would violate some hidden semantic relationship between schema name and topic name. Would this "only" break conventions or lead to actual problems?

Assuming you're using the Confluent Schema Registry, then each topic is a unique subject, but the schemas can indeed be shared since matching schemas would generate matching ids.

This isn't a problem and saves storage on the brokers by not storing duplicate information

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM