集成 spring-cloud-starter-bus-rocketmq 组件

This commit is contained in:
YunaiV
2022-06-19 00:37:44 +08:00
parent 7b36eca609
commit 6dd514b84a
31 changed files with 223 additions and 351 deletions

View File

@@ -51,12 +51,13 @@ dubbo:
address: spring-cloud://localhost # 设置使用 Spring Cloud 注册中心
--- #################### MQ 消息队列相关配置 ####################
spring:
cloud:
# Spring Cloud Stream 配置项,对应 BindingServiceProperties 类
stream:
function:
definition: roleRefreshConsumer;menuRefreshConsumer;roleMenuRefreshConsumer;userRoleRefreshConsumer;
# function:
# definition: roleRefreshConsumer;roleMenuRefreshConsumer;userRoleRefreshConsumer;
# Binding 配置项,对应 BindingProperties Map
bindings:
roleRefresh-out-0:
@@ -64,21 +65,6 @@ spring:
roleRefreshConsumer-in-0:
destination: system_role_refresh
group: system_role_refresh_consumer_group
menuRefresh-out-0:
destination: system_menu_refresh
menuRefreshConsumer-in-0:
destination: system_menu_refresh
group: system_menu_refresh_consumer_group
roleMenuRefresh-out-0:
destination: system_role_menu_refresh
roleMenuRefreshConsumer-in-0:
destination: system_role_menu_refresh
group: system_role_menu_refresh_consumer_group
userRoleRefresh-out-0:
destination: system_user_role_refresh
userRoleRefreshConsumer-in-0:
destination: system_user_role_refresh
group: system_user_role_refresh_consumer_group
# Spring Cloud Stream RocketMQ 配置项
rocketmq:
# RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类
@@ -88,20 +74,12 @@ spring:
producer: # RocketMQ Producer 配置项,对应 RocketMQProducerProperties 类
group: system_producer_group # 生产者分组
send-type: SYNC # 发送模式SYNC 同步
# RocketMQ 自定义 Binding 配置项,对应 RocketMQBindingProperties Map
bindings:
roleRefreshConsumer-in-0:
consumer:
message-model: BROADCASTING # 广播消费
menuRefreshConsumer-in-0:
consumer:
message-model: BROADCASTING # 广播消费
roleMenuRefreshConsumer-in-0:
consumer:
message-model: BROADCASTING # 广播消费
userRoleRefreshConsumer-in-0:
consumer:
message-model: BROADCASTING # 广播消费
# Spring Cloud Bus 配置项,对应 BusProperties 类
bus:
enabled: true # 是否开启,默认为 true
id: ${spring.application.name}:${server.port} # 编号Spring Cloud Alibaba 建议使用“应用:端口”的格式
destination: springCloudBus2 # 目标消息队列,默认为 springCloudBus
--- #################### 芋道相关配置 ####################