在Kafka 的安装目录下,通过下面这条命令可以创建一个 partition 为3,replica 为2的 topic(test) ./bin/kafka-topics.sh --create --topic test --zookeeper XXXX --partitions 3 --replication-factor 2 1. kafka-topics.sh 实际上是调用 kafka.admin.TopicCommand 的方法来创建 topic,其实现如下: //note:...
kafka-topics.sh最终是运行了kafka.admin.TopicCommand这个类,在0.8的源码中这个类中没有找到有delete topic相关的代码。 在kafka的admin包下,提供了一个DeleteTopicCommand的类,可以实现删除topic的功能。 kafka.admin.DeleteTopicCommand 其中删除topic的具体实现代码如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14...
> bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic my-topic –deleteConfig max.message.bytes 或者是删除指定的topic中的某个自定义参数: > bin/kafka-configs.sh –zookeeper localhost:2181 –entity-type topics –entity-name my-topic –alter –delete-config max.message.bytes 查看所有to...
kafka topics are not getting created when I run the command:kafka-topics.sh --bootstrap-server localhost:9092 --create --topic my-topic --partitions 1 Getting the below error message after a few minutes: Error while executing topic command : Timed out waiting for a node assignment. Call: ...
Then, go to the kafka_2.12-2.8.1/bin directory on the client machine and run the export command. export BS=my-endpoint Run the following command to create a topic called msk-serverless-tutorial. <path-to-your-kafka-installation>/bin/kafka-topics.sh --bootstrap-server $BS --command-...
>bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test We can now see that topic if we run the list topic command: 创建好之后,可以通过运行以下命令,查看已创建的topic信息: >bin/kafka-topics.sh --list --zookeeper localhost:2181test ...
$ export KAFKA_OPTS="-Djava.security.auth.login.config=/opt/bitnami/kafka/config/kafka_jaas.conf" $ /opt/bitnami/kafka/bin/kafka-topics.sh --create --command-config /opt/bitnami/kafka/config/producer.properties --bootstrap-server localhost:9092 --topic test Created topic test. Could you ...
COMMAND="JMX_PORT='' ${KAFKA_HOME}/bin/kafka-topics.sh \\ --create \\ --zookeeper ${KAFKA_ZOOKEEPER_CONNECT} \\ --topic ${topicConfig[0]} \\ --partitions ${topicConfig[1]} \\ --replication-factor ${topicConfig[2]} \\ ${config} \\ ${KAFKA_0_10_OPTS} &" eval...
<path-to-your-kafka-installation>/bin/kafka-topics.sh --create --bootstrap-server bootstrapServerString --replication-factor 2 --partitions 1 --topic mkc-tutorial-topic If the command succeeds, you see the following message: Created topic mkc-tutorial-topic. Next Step Create connector Document...
CreateTopic Last updated:2023-07-05 15:57:42 1. API Description Domain name for API request: ckafka.tencentcloudapi.com. This API is used to create a CKafka topic. A maximum of 20 requests can be initiated per second for this API....