Confluent Schema Registry 持久化 [英] Confluent Schema Registry Persistence
问题描述
即使服务器重新启动,我也希望能够保留具有固定 ID 的架构.
I would like to be able to keep a schema with a fixed id even if the server is restarted.
是否可以将架构保存在架构注册表中,以便在服务器崩溃后让它们具有相同的 ID?
Is it possible to persist the schemas in the Schema Registry in order to have them with the same id after the server crashes?
否则,是否可以在模式注册服务器启动时使用固定 ID 对模式进行硬编码?
Otherwise, is it possible to hardcode a schema with a fixed id when the schema registry server starts?
推荐答案
这就是模式注册的目的:模式有一个固定的 id.SchemaRegistry 实际上并不在磁盘上存储任何东西.它利用 kafka 将所有信息存储在一个压缩的主题中(在代理上,默认情况下 _schemas
).
This is the purpose of schema registry: a schema has a fixed id.
SchemaRegistry doesn't store anything on disk actually. It leverages on kafka to store all information in a compacted topic (on broker, _schemas
by default).
因此,只要您注册了架构,无论何时您请求相同的架构,您都会获得相同的 id,即使在崩溃/重启之后也是如此
So as long as you have register a schema, whenever you asked for this same schema, you will get the same id, even after crash / restart
这篇关于Confluent Schema Registry 持久化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!