Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KSQL - drop topic

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.
like image 575
Lanayx Avatar asked Dec 12 '25 13:12

Lanayx


2 Answers

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.

like image 78
Hojjat Avatar answered Dec 16 '25 01:12

Hojjat


You can delete the topic when you delete the stream/table with the command: drop stream my_stream delete topic or drop table my_table delete topic;

like image 21
Emerzonic Avatar answered Dec 16 '25 00:12

Emerzonic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!