KSQL - 删除主题 [英] KSQL - drop topic

查看:31
本文介绍了KSQL - 删除主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从 KSQL 中删除主题?根据 github 有可能,我试过

Is there a way to drop the topic from KSQL? According to github it is possible, and I tried

DROP TOPIC my-topic
DROP TOPIC "my-topic"
DROP TOPIC 'my-topic'
DROP TOPIC `my-topic`

但是这两个命令都不起作用.我收到消息

But neither of this commands works. I get message

 Message
-------------------------------------------------------------------------------
 io.confluent.ksql.util.KsqlException: No topic with name true was registered.

推荐答案

KSQL topic 与 Kafka topic 是不同的概念.KSQL 主题是 KSQL 的一个内部概念,它表示一个 kafka 主题以及关于该主题的元数据,包括主题格式.由于我们不会在外部公开 KSQL 主题,因此您不应在 KSQL 语句中使用它.如果你想删除一个 kafka 主题,你应该从 kafka 中删除它.未来我们计划在 KSQL 中添加主题管理功能.

KSQL topic is different concept than Kafka topic. KSQL topic is an internal concept for KSQL that represents a kafka topic along with metadata about that topic including the topic format. Since we do not expose KSQL topic externally you should not use it in KSQL statements. If you wanna delete a kafka topic, you should delete it from kafka. In future we plan to add topic management capability to KSQL.

这篇关于KSQL - 删除主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆