mirror of
https://gitee.com/yudaocode/SpringBoot-Labs.git
synced 2026-09-03 05:53:54 +08:00
增加 spring cloud bus rocketmq 示例
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user