增加 spring cloud bus rocketmq 示例

This commit is contained in:
YunaiV
2020-04-09 08:48:38 +08:00
parent f48dfc7a84
commit d9cfd3c515
2 changed files with 8 additions and 8 deletions

View File

@@ -2,9 +2,9 @@ spring:
application:
name: listener-demo
# rocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
server:
port: ${random.int[10000,19999]} # 随机端口,方便启动多个消费者
# rocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 127.0.0.1:9876 # RocketMQ Namesrv

View File

@@ -5,12 +5,12 @@ spring:
application:
name: publisher-demo
# Kafka 配置项,对应 KafkaProperties 配置类
rocketmq:
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
# Bus 相关配置项,对应 BusProperties
cloud:
bus:
enabled: true # 是否开启,默认为 true
destination: springCloudBus # 目标消息队列,默认为 springCloudBus
# rocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 127.0.0.1:9876 # RocketMQ Namesrv