问题
I would like to be able to keep a schema with a fixed id even if the server is restarted.
Is it possible to persist the schemas in the Schema Registry in order to have them with the same id after the server crashes?
Otherwise, is it possible to hardcode a schema with a fixed id when the schema registry server starts?
回答1:
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).
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
来源:https://stackoverflow.com/questions/45275334/confluent-schema-registry-persistence