mq:移除默认的 spring cloud stream 和 bus,使用原生的 spring-rocketmq、spring-kafka、spring-rabbitmq 替代,降低学习成本,提升使用灵活性。
This commit is contained in:
@@ -59,13 +59,6 @@ spring:
|
||||
# password: 123456 # 密码,建议生产环境开启
|
||||
|
||||
--- #################### MQ 消息队列相关配置 ####################
|
||||
spring:
|
||||
cloud:
|
||||
stream:
|
||||
rocketmq:
|
||||
# RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类
|
||||
binder:
|
||||
name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
xxl:
|
||||
|
||||
@@ -70,14 +70,6 @@ spring:
|
||||
# password: 123456 # 密码,建议生产环境开启
|
||||
|
||||
--- #################### MQ 消息队列相关配置 ####################
|
||||
spring:
|
||||
cloud:
|
||||
stream:
|
||||
rocketmq:
|
||||
# RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类
|
||||
binder:
|
||||
name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址
|
||||
binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
|
||||
|
||||
@@ -74,44 +74,6 @@ spring:
|
||||
|
||||
--- #################### MQ 消息队列相关配置 ####################
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
# Spring Cloud Stream 配置项,对应 BindingServiceProperties 类
|
||||
stream:
|
||||
function:
|
||||
definition: busConsumer;smsSendConsumer;mailSendConsumer
|
||||
# Binding 配置项,对应 BindingProperties Map
|
||||
bindings:
|
||||
smsSend-out-0:
|
||||
destination: system_sms_send
|
||||
smsSendConsumer-in-0:
|
||||
destination: system_sms_send
|
||||
group: system_sms_send_consumer_group
|
||||
mailSend-out-0:
|
||||
destination: system_mail_send
|
||||
mailSendConsumer-in-0:
|
||||
destination: system_mail_send
|
||||
group: system_mail_send_consumer_group
|
||||
# Spring Cloud Stream RocketMQ 配置项
|
||||
rocketmq:
|
||||
# RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类
|
||||
binder:
|
||||
name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址
|
||||
default: # 默认 bindings 全局配置
|
||||
producer: # RocketMQ Producer 配置项,对应 RocketMQProducerProperties 类
|
||||
group: system_producer_group # 生产者分组
|
||||
send-type: SYNC # 发送模式,SYNC 同步
|
||||
bindings:
|
||||
springCloudBusInput:
|
||||
consumer:
|
||||
message-model: BROADCASTING # 重要,解决 Spring Cloud Bus RocketMQ 默认不是 BROADCASTING 广播消费的问题
|
||||
|
||||
# Spring Cloud Bus 配置项,对应 BusProperties 类
|
||||
bus:
|
||||
enabled: true # 是否开启,默认为 true
|
||||
id: ${spring.application.name}:${server.port} # 编号,Spring Cloud Alibaba 建议使用“应用:端口”的格式
|
||||
destination: springCloudBus # 目标消息队列,默认为 springCloudBus
|
||||
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
|
||||
xxl:
|
||||
|
||||
Reference in New Issue
Block a user