7.4. 使用 Kafka 消费者客户端中的 schema
此流程描述了如何配置使用 Java 编写的 Kafka 消费者客户端,以使用 Service Registry 中的模式。
先决条件
- 已安装 Service Registry
- 模式使用 Service Registry 注册
流程
使用 Service Registry 的 URL 配置客户端。例如:
String registryUrl = "https://registry.example.com/apis/registry/v2"; Properties props = new Properties(); props.putIfAbsent(SerdeConfig.REGISTRY_URL, registryUrl);
String registryUrl = "https://registry.example.com/apis/registry/v2"; Properties props = new Properties(); props.putIfAbsent(SerdeConfig.REGISTRY_URL, registryUrl);
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用 Service Registry deserializer 配置客户端。例如:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow