0

Endpoint : http://localhost:8082/v3/clusters/cluster-id/topics

post body : { "topic_name": "topic-X", "partitions_count": 1, "replication_factor": 1, "configs": [ { "name": "cleanup.policy", "value": "compact" }, { "name": "compression.type", "value": "gzip" } ] }

Exception : java.lang.NullPointerException: Cannot invoke "io.confluent.kafkarest.entities.v3.CreateTopicRequest.getTopicName()" because "request" is null at io.confluent.kafkarest.resources.v3.TopicsResource.createTopic(TopicsResource.java:137)

4

1 回答 1

0

将端口从 8082 更改为 8090 端点后能够创建主题:http://localhost:8090/v3/clusters/cluster-id/topics。

几件事。根据汇合文档默认侦听器是 8082,不确定 8090 端口配置

听众

类型:列表默认值:http: //0.0.0.0 :8082 重要性:高

https://docs.confluent.io/platform/current/kafka-rest/production-deployment/rest-proxy/config.html

于 2021-04-28T14:33:03.727 回答