Skip to content

Commit d9cfd3c

Browse files
author
YunaiV
committed
增加 spring cloud bus rocketmq 示例
1 parent f48dfc7 commit d9cfd3c

File tree

2 files changed

+8
-8
lines changed
  • labx-20

2 files changed

+8
-8
lines changed

labx-20/labx-20-sca-bus-rocketmq-demo-listener/src/main/resources/application.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ spring:
22
application:
33
name: listener-demo
44

5-
# rocketmq 配置项,对应 RocketMQProperties 配置类
6-
rocketmq:
7-
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
8-
95
server:
106
port: ${random.int[10000,19999]} # 随机端口,方便启动多个消费者
7+
8+
# rocketmq 配置项,对应 RocketMQProperties 配置类
9+
rocketmq:
10+
name-server: 127.0.0.1:9876 # RocketMQ Namesrv

labx-20/labx-20-sca-bus-rocketmq-demo-publisher/src/main/resources/application.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ spring:
55
application:
66
name: publisher-demo
77

8-
# Kafka 配置项,对应 KafkaProperties 配置类
9-
rocketmq:
10-
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
11-
128
# Bus 相关配置项,对应 BusProperties
139
cloud:
1410
bus:
1511
enabled: true # 是否开启,默认为 true
1612
destination: springCloudBus # 目标消息队列,默认为 springCloudBus
13+
14+
# rocketmq 配置项,对应 RocketMQProperties 配置类
15+
rocketmq:
16+
name-server: 127.0.0.1:9876 # RocketMQ Namesrv

0 commit comments

Comments
 (0)