update 优化 kafka 示例 支持自动创建 topic

This commit is contained in:
疯狂的狮子Li
2024-06-15 17:04:27 +08:00
parent 9a90030956
commit 681f6cc55a
2 changed files with 2 additions and 10 deletions

View File

@@ -32,13 +32,3 @@ sh mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c <cluster_name>
```shell
bin/mqadmin updatetopic -n localhost:9876 -t transaction-topic -c DefaultCluster -a +message.type=TRANSACTION
```
kafka:
```shell
kafka-topics.sh --create --topic <topic_name> --bootstrap-server <broker_list> --partitions <num_partitions> --replication-factor <replication_factor>
```
```shell
kafka-topics.sh --create --topic test-topic --bootstrap-server localhost:9092 --partitions 3 --replication-factor 1
```