feat(delivery): 真实 Kafka 投递端口 + 闭合 G-BACKFILL-BACKOFF 配置缺口
- 新增 KafkaDeliveryPort:ProducerRegistry + 同步 Future.get() 至少一次投递, 闭合 OPS-1 真实适配器要求与 US-07 INV-10/C-29 - 回填退避从硬编码 30s/15min 提升为 backfill-backoff-ms / backfill-backoff-cap-ms 配置绑定,闭合 [G-BACKFILL-BACKOFF] - 删除死依赖 micronaut-redis-lettuce(代码零引用,ACM2-28 Redis 已退出阶段 A)
This commit is contained in:
@@ -42,8 +42,6 @@ class BackfillService(
|
||||
private val log = org.slf4j.LoggerFactory.getLogger(BackfillService::class.java)
|
||||
|
||||
companion object {
|
||||
private val INITIAL_BACKOFF: Duration = Duration.ofSeconds(30)
|
||||
private val MAX_BACKOFF: Duration = Duration.ofMinutes(15)
|
||||
private val TERMINAL_STATES = setOf(ProcStatus.SUCCEEDED, ProcStatus.SKIPPED, ProcStatus.DEAD)
|
||||
|
||||
/** 放弃原因:运行时查询确认信箱行不存在(确定性结论,重试不会改变结果)。 */
|
||||
@@ -51,11 +49,13 @@ class BackfillService(
|
||||
|
||||
/** 放弃原因:暂时性故障持续到 `R` 仍未打标;停止自动重试,但保留人工恢复能力。 */
|
||||
const val ABANDON_TRANSIENT_DEADLINE = "TRANSIENT_DEADLINE"
|
||||
}
|
||||
|
||||
fun backoffDelayFor(attempts: Int): Duration {
|
||||
val shift = (attempts - 1).coerceIn(0, 20)
|
||||
return INITIAL_BACKOFF.multipliedBy(1L shl shift).coerceAtMost(MAX_BACKOFF)
|
||||
}
|
||||
internal fun backoffDelayFor(attempts: Int): Duration {
|
||||
val initial = Duration.ofMillis(props.pipeline.backfillBackoffMs)
|
||||
val cap = Duration.ofMillis(props.pipeline.backfillBackoffCapMs)
|
||||
val shift = (attempts - 1).coerceIn(0, 20)
|
||||
return initial.multipliedBy(1L shl shift).coerceAtMost(cap)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user