34 lines
968 B
Go
34 lines
968 B
Go
package queue
|
|
|
|
// Topic 键:config.Kafka.Topics 的键名(业务事件类型)。
|
|
const (
|
|
KeySubmit = "submit" // 下行发送任务
|
|
KeyReport = "report" // 状态回执
|
|
KeyUp = "up" // 上行消息
|
|
KeyStats = "stats" // 统计事件
|
|
KeyDeliver = "deliver" // Day 61:CMPP Deliver 回执下发(终态→协议侧推送桥)
|
|
)
|
|
|
|
// 默认 Topic 名(与实施计划 A-0.4 验收项一致:四个核心 Topic)。
|
|
const (
|
|
TopicSubmit = "sms-submit"
|
|
TopicReport = "sms-report"
|
|
TopicUp = "sms-up"
|
|
TopicStats = "stats"
|
|
TopicDeliver = "cmpp-deliver"
|
|
)
|
|
|
|
// DLQSuffix 死信主题后缀:发送重试耗尽的消息进入 <topic>.dlq。
|
|
const DLQSuffix = ".dlq"
|
|
|
|
// DefaultTopics 返回键→默认主题名映射(供配置缺省时使用)。
|
|
func DefaultTopics() map[string]string {
|
|
return map[string]string{
|
|
KeySubmit: TopicSubmit,
|
|
KeyReport: TopicReport,
|
|
KeyUp: TopicUp,
|
|
KeyStats: TopicStats,
|
|
KeyDeliver: TopicDeliver,
|
|
}
|
|
}
|