【问题标题】:Specify KSQL Stream Subject names explicitly明确指定 KSQL 流主题名称
【发布时间】:2020-03-30 07:45:28
【问题描述】:

我有两个 KSQL 主题 my-topic-1my-topic-2,消息通过 AVRO 序列化。由于历史原因,my-topic-1 架构不是推荐的topic-value 格式,而是my-custom-subject-name

我想通过 KSQL 将记录从一个主题移动到另一个主题。

首先,让我们创建一个流:

CREATE STREAM my-stream-1
    WITH (KAFKA_TOPIC='my-topic-1', VALUE_FORMAT='AVRO');

哎呀:

Avro schema for message values on topic my-topic-1 does not exist in the Schema Registry.
Subject: my-topic-1-value

Possible causes include:
- The topic itself does not exist
        -> Use SHOW TOPICS; to check
- Messages on the topic are not Avro serialized
        -> Use PRINT 'my-topic-1' FROM BEGINNING; to verify
- Messages on the topic have not been serialized using the Confluent Schema Registry Avro serializer
        -> See https://docs.confluent.io/current/schema-registry/docs/serializer-formatter.html
- The schema is registered on a different instance of the Schema Registry
        -> Use the REST API to list available subjects
        https://docs.confluent.io/current/schema-registry/docs/api.html#get--subjects

正在寻找主题my-topic-1-value

有人知道这是否可能吗? VALUE_AVRO_SCHEMA_FULL_NAME 提到 here 没有做我想做的事。

【问题讨论】:

    标签: apache-kafka avro ksqldb


    【解决方案1】:

    这似乎是一个错误。我已经更新了https://github.com/confluentinc/ksql/issues/3188,并提供了一个重现的示例。我建议我们在那里追踪它。

    猜你喜欢
    • 2019-02-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-19
    • 2019-02-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多