feat(ingress): 实现 JDBC 信箱轮询、入站持久化与对拍测试 (U05)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.gzzn.omms.msgexchange.processing
|
||||
|
||||
import com.gzzn.omms.msgexchange.config.PipelineProps
|
||||
import com.gzzn.omms.msgexchange.domain.DecodedMessage
|
||||
import java.time.LocalDate
|
||||
|
||||
/**
|
||||
* ACMA-8 I3:幂等键 = SNDR|TYPE|STYP|SEQN。
|
||||
* 计算集中此处唯一入口;“是否含日边界”可配置且默认关闭(CONFIRM 矩阵 #11,
|
||||
* SEQN 重置作用域确认前不改语义——上线后不改幂等键)。
|
||||
*/
|
||||
object Identity {
|
||||
fun of(
|
||||
msg: DecodedMessage,
|
||||
includeDayBoundary: Boolean,
|
||||
day: LocalDate = LocalDate.now(),
|
||||
): String {
|
||||
val base = "${msg.meta.sndr}|${msg.meta.type}|${msg.meta.styp}|${msg.meta.seqn}"
|
||||
return if (includeDayBoundary) "$base|${day}" else base
|
||||
}
|
||||
|
||||
fun of(msg: DecodedMessage, props: PipelineProps.Identity): String =
|
||||
of(msg, props.includeDayBoundary)
|
||||
}
|
||||
Reference in New Issue
Block a user