Commit Graph

6 Commits

Author SHA1 Message Date
dd2b933c08 feat(mq-starter): redis-stream 重试可放量(PEL reclaim + 超限落库)
- MqSubscription 增加 retryExhaustedHandler;registry 从 errorHandler 接线 RETRY_EXHAUSTED 回调
- redis driver 每轮 reclaim PEL:connection 层 xClaim 认领超 idle 消息并使 delivery+1
  - delivery <= maxRetry:重投消费,成功 ACK / 失败留 PEL
  - delivery > maxRetry:回调 retryExhaustedHandler 落库 + ACK 终止,不再卡队列
- 可配 reclaimMinIdleMs(默认 5000ms,对齐 legacy 5s 延迟);4 参构造 + 3 参重载
- 集成测试连真实 redis 验证 重试耗尽→落库→ACK;全仓 28 测试绿

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 20:17:05 +08:00
407df30457 feat(mq-starter-redis-stream): 去重 Redis 默认实现 RedisMqIdempotentStore
- 实现 MqIdempotentStore:setIfAbsent 原子占用 + processing/success/fail 状态机 + TTL
- 修正 legacy 读写 key 不一致缺陷(读写统一前缀键)
- autoconfig 在 redis-stream 模式装配为默认 store(@ConditionalOnMissingBean)
- 集成测试连真实 redis 验证状态机;@Bean 声明契约护栏

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 19:59:07 +08:00
e5991718e6 test(mq-starter): driver autoconfig 加 @AutoConfigureBefore 注解契约护栏
Rocket / RedisStream driver autoconfig 各加一个护栏测试,断言
@AutoConfigureBefore(MqCoreAutoConfiguration) 注解存在——防止重构误删导致 core 在
driver 前装配、MqTemplate/MqListenerRegistry 不装配的回归(最终 review I1)。
以注解契约守护、不 refresh context(规避本模块 spring 版本不一致:rocketmq-spring
2.2.3 与父 pom spring-boot 2.3.12 的 spring-core 缺 ApplicationStartup);真实装配
结果由 cn-data-platform MqSliceWiringTest 在正确 spring 版本下覆盖。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 14:08:26 +08:00
9f6ffad77c fix(mq-starter): driver autoconfig 加 @AutoConfigureBefore(MqCoreAutoConfiguration)
真实 autoconfig 顺序按类名字母序,com.njcn.mq.autoconfig.MqCoreAutoConfiguration
先于 com.njcn.mq.driver.* 处理,core 的 @ConditionalOnBean(MqDriver) 在 driver
bean 注册前求值失败,导致 MqTemplate / MqListenerRegistry 在真实应用中均不装配。
两个 driver autoconfig 各加 @AutoConfigureBefore(MqCoreAutoConfiguration.class),
保证 driver 先于 core 装配。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 12:01:41 +08:00
acc745c52e feat(mq-starter-redis-stream): redis driver 复用 Phase1 低层件 + 薄收发循环
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 05:17:27 +08:00
491b83de94 feat(mq-starter): 多模块脚手架 + core 信封/SPI/注解
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 04:41:54 +08:00