bitnami/schema-registry和apicurio/schema-registry for Kafka都是用于管理和存储Avro模式的工具,但有一些区别。
功能和特性:
集成和部署:
下面是使用bitnami/schema-registry和apicurio/schema-registry for Kafka的代码示例:
Properties props = new Properties();
props.put("schema.registry.url", "http://localhost:8081");
SchemaRegistryClient client = new CachedSchemaRegistryClient(props);
SchemaRegistryConfig config = new SchemaRegistryConfigBuilder()
.schemaRegistryUrl("http://localhost:8080/api")
.build();
SchemaRegistryClient client = new CachedSchemaRegistryClient(config);
请注意,示例中的URL和配置可能需要根据实际部署进行更改。