Could I create a topic in Kafka via API?

馋奶兔 提交于 2020-07-23 06:38:17

问题


I'm trying to find information about the topic creation in Kafka via API, because I need to automate some tasks, It would be great if someone knows if it's possible, I was reading here:

https://docs.confluent.io/current/kafka-rest/api.html#crest-api-v3

But it didn't work for me. If I try to do

GET in /v3/clusters/ --> returns code 404

回答1:


I'm answering my own question.

I post here what I found, that rest endpoint is useful only in case you have configured kafka rest proxy, if not, try to use any external library.

If found this one:

https://docs.confluent.io/current/clients/confluent-kafka-python/index.html

"Kafka Admin client: create, view, alter, delete topics and resources."



来源:https://stackoverflow.com/questions/62890614/could-i-create-a-topic-in-kafka-via-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!