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

2.X
疯狂的狮子Li 7 months ago
parent 9a90030956
commit 681f6cc55a

@ -32,13 +32,3 @@ sh mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c <cluster_name>
```shell ```shell
bin/mqadmin updatetopic -n localhost:9876 -t transaction-topic -c DefaultCluster -a +message.type=TRANSACTION 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
```

@ -33,6 +33,8 @@ spring:
streams: streams:
properties: properties:
application.id: kafka-streams-id # 应用ID application.id: kafka-streams-id # 应用ID
properties:
auto.create.topics.enable: true # 开启自动创建话题功能默认是false根据需要设置
--- # rocketmq 配置 --- # rocketmq 配置
rocketmq: rocketmq:

Loading…
Cancel
Save