|
|
e6ea14046c
|
refactor(mq-starter-redis-stream): 去重 store 与 idempotent 配置迁至 mq-starter-idempotent-redis,模块改为依赖之
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-10 11:50:37 +08:00 |
|
|
|
84034fb7d0
|
feat(mq-starter-redis-stream): 去重 TTL / reclaim idle 外置为 mq.redis-stream.* 可配置
原先 reclaim idle 与去重 TTL/前缀硬编码在 autoconfig 里,按业务处理时延调优只能改源码。
- 新增 RedisStreamMqProperties(前缀 mq.redis-stream):reclaim-min-idle + idempotent.{key-prefix,processing/success/fail-ttl}
- 默认值与历史硬编码完全一致(reclaim 30s / processing 60s / success 300s / fail 300s / mq:idem:),不改变现有行为
- autoconfig 改由 Properties 取值装配 driver 与 RedisMqIdempotentStore
- 补默认值一致性 + mq.redis-stream.* 绑定覆盖单测;wiring 测试改按方法名反射以适配新签名
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-07-09 20:41:21 +08:00 |
|
|
|
e660afe2a2
|
fix(mq-starter): 去重跳过区分 processing/success,processing 残留不 ACK 避免静默丢消息
tryAcquire 返回 false 的两类跳过此前一律静默 return,导致 driver 无差别 ACK:
消费者在 markSuccess/markFail 前崩溃残留的 processing 标记,会被当成"已处理"
而 ACK,该消息从未成功消费却被丢弃(Critical 静默丢消息)。
- MqIdempotentStore 新增 isCompleted(key),默认 true 保持旧行为,状态机实现须覆写
- MqConsumeDispatcher:跳过时按 isCompleted 分流——success 正常 return 让 driver ACK;
仍 processing 则抛 MqMessageInProgressException(新,纯控制流信号、不带栈)让 driver 不 ACK
- RedisMqIdempotentStore.isCompleted 仅 success 视为完成;RedisStreamMqDriver 捕获信号异常时留 PEL 待重投
- 补 dispatcher 两类跳过 + store isCompleted 语义单测
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-07-09 20:41:02 +08:00 |
|
|
|
886c02ff96
|
fix(mq-starter): 修复启动 fail-fast 校验 review 发现的缺陷(relaxed binding / 逃生开关 / redis 假地址)
workflow 多智能体 review 后修复:
- rocketmq 探测改用 Binder 读 rocketmq.name-server,与 driver(RocketMQProperties)同源、
享受 relaxed binding,修复 camelCase(rocketmq.nameServer) 被误判为「未配置」而错误 fail-fast
- MqStartupChecks 逃生开关只认严格 false(忽略大小写/空白),缺省或非法值一律继续校验,
不再因非法布尔值(如 enabled=disabled)抛类型转换异常炸掉启动
- redis 探测 target() 对 cluster/sentinel 回退到指向真实配置项的文案,
不再假报使用者从未配过的 localhost:6379
- 补齐回归测试:camelCase 键 / 非法开关值继续校验 / host:port 提示分支 / cluster 回退
(core 5、redis-stream 5、rocketmq 5,全绿)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-07-09 14:06:05 +08:00 |
|
|
|
46b0c13462
|
feat(mq-starter-redis-stream): 启动期 PING 探测 Redis 连通性(①② fail-fast)
|
2026-07-09 10:49:23 +08:00 |
|
|
|
f0dc785998
|
fix(mq-starter): 落实 opus review 反馈(含 1 个 Critical 静默丢消息)
- [Critical] dispatcher errorHandler 抛异常时仍保证 markFail + 抛原始异常(safeOnError 隔离):
否则去重标记停在 processing,reclaim 重投被去重挡掉并 ACK → 静默丢消息
- [Important] 重试耗尽回调携带完整 payload(reclaim 解码 body,不再传 null)
- [Important] reclaim 默认 idle 5s→30s,避免多实例误 reclaim in-flight 消息;注释 at-least-once 语义
- [Important] idempotent=true 但无 MqIdempotentStore bean 时 start() 告警
- core 引入 slf4j-api(provided);批量失败 / errorHandler 失败均记日志
- errorHandler bean 未找到时抛带 topic/group 的清晰错误
- 文档化已知限制(批量无 idle flush、去重 fail→reopen 非原子)
- 全仓 29 测试绿(含连真实 redis 的 IT)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-29 20:48:53 +08:00 |
|
|
|
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 |
|