You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何获取Schema Registry URL与API Key?Confluent平台操作疑问

获取Confluent Schema Registry URL与API Key的操作指南

1. 确认环境并启用Schema Registry

  • Confluent Cloud(托管服务):
    • 登录控制台后进入目标环境(Environment),点击左侧的Cluster进入对应Kafka集群页面
    • 顶部导航栏找Schema Registry选项卡——如果看不到,说明该集群未启用此服务,点击Enable Schema Registry完成启用即可
  • 自托管Confluent Platform:
    • Schema Registry默认随平台部署,直接进入Confluent Control Center即可找到管理入口

2. 获取Schema Registry URL

  • Confluent Cloud:启用后在Schema Registry页面的Settings板块,直接显示官方分配的URL
  • 自托管环境:查看Schema Registry配置文件schema-registry.properties,listeners配置项对应的地址就是URL(如http://localhost:8081)

3. 生成/获取API Key

  • Confluent Cloud:
    • 在Schema Registry页面的API Keys板块,点击Create API Key,填写描述后即可生成Key和Secret(Secret仅显示一次,务必保存)
  • 自托管环境:
    • 用Confluent CLI执行命令:confluent api-key create --resource schema-registry
    • 或在Control Center的Schema Registry管理页,进入Security > API Keys,点击Add API Key生成

4. Python连接配置示例

使用confluent-kafka库连接的基础代码如下:

from confluent_kafka.schema_registry import SchemaRegistryClient

schema_registry_config = {
    "url": "你的Schema Registry URL",
    "basic.auth.user.info": "API Key:API Secret"
}

client = SchemaRegistryClient(schema_registry_config)

内容的提问来源于stack exchange,提问作者Maya Stein

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 17:22:05