feat(runtime): U07 生命周期装配 + stub 装配冒烟(ACM2-10 U07/U01 遗留)
- PipelineLifecycle:ServerStartupEvent 后在专用单线程(msgx-pump/msgx-dispatcher,daemon) 拉起 Pump/Dispatcher 循环;停机 requestStop+interrupt+join;@Requires(msgx.pipeline.autostart=true) - PipelineProps.pipeline.autostart(默认 false,生产/测试默认不自动起循环,防泄漏线程) - stub 装配(infra/stub,@Requires(msgx.stubs=true)):7 仓储内存实装 + StubXmlCodec(未实装 → CODEC_ERROR 走 FAILED 可重放路径)+ StubRedis + StubDeliveryPort + Holder Factory - 配置:application-dev.yml(stubs+autostart,/env、/beans 放开,无需 DB 即可 dev 跑通); application-test.yml(stubs=true、autostart=false);README 补 dev stub 运行说明 - PipelineSmokeTest(4):等价 /beans 装配核验 + 收报→主泵领取→FAILED(CODEC_ERROR) + U11 重放 回 PENDING + Dispatcher flush 聚合(stub 用例前清内存状态防上下文复用串扰) - 全量测试 34 个通过
This commit is contained in:
@@ -1,6 +1,27 @@
|
||||
# 开发/影子对拍环境 profile(U03/N32):放开管理端点可见性以便“改值—回读”与 /beans 装配核验。
|
||||
# 生产环境不加载本 profile(/env、/beans 保持默认 sensitive)。
|
||||
# 开发/影子对拍环境 profile(U03/N32 + U07):
|
||||
# - /env、/beans 放开以便“改值—回读”与装配核验(生产 profile 不加载本文件)
|
||||
# - msgx.stubs=true:无 MySQL/Redis/Kafka 时以内存 stub 仓储跑通「启动 + 收报 + 主泵/投递循环」
|
||||
# - msgx.pipeline.autostart=true:启动即拉起 Pump/Dispatcher 专用线程
|
||||
# 启动:MICRONAUT_ENVIRONMENTS=dev ./gradlew run
|
||||
msgx:
|
||||
register-eureka: false
|
||||
stubs: true
|
||||
pipeline:
|
||||
autostart: true
|
||||
|
||||
# DB 仅在真实实装接入后需要;stub 模式不建连(Flyway 关闭;datasource 保留默认值以免占位符解析失败)
|
||||
flyway:
|
||||
datasources:
|
||||
default:
|
||||
enabled: false
|
||||
|
||||
datasources:
|
||||
default:
|
||||
url: ${MSGX_DB_URL:jdbc:mysql://127.0.0.1:3306/msgexchange_dev}
|
||||
username: ${MSGX_DB_USER:root}
|
||||
password: ${MSGX_DB_PASSWORD:}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
micronaut:
|
||||
endpoints:
|
||||
env:
|
||||
|
||||
@@ -15,6 +15,7 @@ msgx:
|
||||
backoff-ms: [1000, 2000, 4000, 8000, 16000] # 指数退避,单次封顶 60s
|
||||
backoff-cap-ms: 60000
|
||||
head-deadline: 10m # 队头滞留上界 = 最坏 HOL 时长(毒丸升级)
|
||||
autostart: false # U07:启动即拉起 Pump/Dispatcher 循环;需真实仓储或 msgx.stubs=true 才开启(dev 见 application-dev.yml)
|
||||
schd:
|
||||
flush-period: 3s # KEEP 现役推送节律
|
||||
flush-limit: 500 # 批上限,防积压尖峰
|
||||
|
||||
Reference in New Issue
Block a user