简体   繁体   English

我如何告知 confluence cloud 上的主题以编程方式使用特定模式?

[英]How do I tell a topic on confluence cloud to use a specific schema programmatically?

So I know how to create topics on Confluent Cloud with the confluent_kafka AdminClient instance but I'm not sure how to set the topic's message schema programmatically?所以我知道如何使用 confluent_kafka AdminClient 实例在 Confluent Cloud 上创建主题,但我不确定如何以编程方式设置主题的消息模式? To clarify, I have the schema I want to use saved locally in an avro schema file(.avsc)澄清一下,我将要使用的模式保存在本地的 avro 模式文件 (.avsc) 中

Use the AdminClient to create the topic and then use the SchemaRegistryClient to register the schema for the topic.使用 AdminClient 创建主题,然后使用 SchemaRegistryClient 为主题注册模式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Pubsub 主题订阅中使用 JSON 架构 - Use JSON schema in Pubsub topic subscription 如何使用Avro架构验证JSON? - How do I use an Avro schema to validate JSON? 如何在IntelliJ中加载avro架构? - How do I load a avro schema in IntelliJ? 如何在 Google Pub/Sub 主题架构中声明可选字段? - How to declare an optional field in Google Pub/Sub Topic Schema? 除了架构中预定义的原始类型和复杂类型外,如何使Avro代码生成器使用其他类型? - How do I get the avro code generator to use a different type, other than the predefined primitive and complex types in schema? 如何从来自 java 消费者的主题中的消息中从模式注册表中检索 AVRO 模式 - How to retrieve AVRO Schema from Schema Registry from a message in a Topic from java consumer 如何以编程方式从 Python 中的融合模式注册表中获取模式 - How to programmatically get schema from confluent schema registry in Python Kafka Connect:如何在没有架构注册表的情况下使用AvroConverter? - Kafka Connect: how can I use the AvroConverter without schema registry? 如何在Avro架构中定义复杂类型 - How do I define a complex type in an Avro Schema 如何根据 Avro 模式验证 JSON - How do I validate JSON against Avro schema
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM