打印问题

This commit is contained in:
2025-12-30 11:49:54 +08:00
parent 7384b67c50
commit befd2942a2
8 changed files with 107 additions and 26 deletions

View File

@@ -25,7 +25,30 @@ spring:
port: 5672
username: chaozg
password: chaozg123
# 关键优化解决MissedHeartbeatException 心跳超时问题
connection-timeout: 10000 # 连接超时时间10秒避免连接建立过慢
requested-heartbeat: 30 # 心跳间隔调整为30秒原60秒过长降低超时概率过短易误触发
# 高级配置:连接池 & 自动重连(核心优化,避免连接断开后无法恢复)
cache:
connection:
mode: channel # 连接池模式默认channel推荐
size: 10 # 最大连接数,根据业务调整
channel:
size: 50 # 每个连接的最大通道数
# 自动重连配置Spring AMQP 自带,关键兜底)
publisher-returns: true
template:
retry:
enabled: true # 开启消息发送重试
max-attempts: 3 # 最大重试次数
initial-interval: 2000 # 首次重试间隔2秒
multiplier: 1.5 # 重试间隔倍增因子
listener:
simple:
retry:
enabled: true # 开启消费者重试
max-attempts: 3 # 消费者最大重试次数
acknowledge-mode: auto # 确认模式可根据业务改为manual
dubbo:
application:
name: order-server