erp-java/rocketmq/config/inventory-service.yml

75 lines
1.8 KiB
YAML

# Spring Cloud Stream RocketMQ Binder 配置
# 库存服务配置
spring:
application:
name: erp-inventory-service
cloud:
stream:
rocketmq:
binder:
namesrv-addr: ${ROCKETMQ_NAMESRV_ADDR:localhost:9876}
producer:
enabled: true
enable-msg-trace: true
access-key: rocketmq
secret-key: rocketmq123
bindings:
# 库存输出通道
inventoryOutput:
destination: inventory-topic
content-type: application/json
group: erp-inventory-producer-group
binder: rocketmq
# 订单输入通道(接收订单消息,触发库存扣减)
orderInput:
destination: order-topic
content-type: application/json
group: erp-inventory-consumer-group
consumer:
concurrency: 16
maxAttempts: 3
binder: rocketmq
# 通知输出通道(发送库存预警等通知)
notificationOutput:
destination: notification-topic
content-type: application/json
group: erp-inventory-producer-group
binder: rocketmq
rocketmq:
namesrv-addr: ${ROCKETMQ_NAMESRV_ADDR:localhost:9876}
producer:
group: erp-inventory-producer-group
retry-times-when-send-failed: 3
timeout: 3000
consumer:
group: erp-inventory-consumer-group
consume-concurrency: 16
max-retry-times: 3
erp:
rocketmq:
topics:
order: order-topic
inventory: inventory-topic
notification: notification-topic
consumer:
groups:
inventory-group: erp-inventory-consumer-group
notification-group: erp-notification-consumer-group
server:
port: 8082
logging:
level:
org.apache.rocketmq: INFO
com.erp.mq: DEBUG