feat(msg): v2 ARB-013 topic 命名统一 + 考试事件消费

ARB-013 P0 修复:PRODUCER_TOPIC_MAP 从 edu.notification.* 改为 edu.notify.notification.*

kafka.consumer 新增 3 考试实时事件消费(exam.extended/force_submitted/question_reordered)

嵌套 payload 解包支持 + topic-map 扩展

新增 6 测试数据文件(docker-notify + 5 kafka 事件 json)

101 单元测试通过 + Docker 真实环境验证
This commit is contained in:
SpecialX
2026-07-14 23:00:33 +08:00
parent ad39a3bb0f
commit 765f7da4c0
13 changed files with 695 additions and 35 deletions

View File

@@ -0,0 +1 @@
{"userId":"test-v2-user-001","type":"system","title":"ARB-013 verify","content":"topic 验证测试","channel":"in_app","eventId":"evt-v2-001"}

View File

@@ -0,0 +1 @@
{"event_id":"evt-exam-ext-001","aggregate_id":"exam-001","event_type":"exam.extended","occurred_at":1784021868,"payload":{"examId":"exam-001","classId":"cls-001","className":"高三1班","subjectId":"math","extensionSeconds":300,"newDuration":7200,"studentIds":["stu-exam-001","stu-exam-002"]},"metadata":{"schema_version":"v1"}}

View File

@@ -0,0 +1 @@
{"event_id":"evt-exam-force-001","aggregate_id":"exam-001","event_type":"exam.force_submitted","occurred_at":1784021868,"payload":{"examId":"exam-001","classId":"cls-001","examTitle":"期末数学考试","studentIds":["stu-exam-001"]},"metadata":{"schema_version":"v1"}}

View File

@@ -0,0 +1 @@
{"event_id":"evt-exam-reorder-001","aggregate_id":"exam-001","event_type":"exam.question_reordered","occurred_at":1784021868,"payload":{"examId":"exam-001","classId":"cls-001","examTitle":"期末数学考试","studentIds":["stu-exam-001","stu-exam-002"]},"metadata":{"schema_version":"v1"}}

View File

@@ -0,0 +1 @@
{"eventId":"evt-hw-test-001","homeworkId":"hw-test-001","homeworkTitle":"Kafka 消费测试作业","classId":"cls-test-001","className":"测试班级","subject":"数学","studentIds":["stu-test-001","stu-test-002"],"dueDate":"2026-07-20"}

View File

@@ -0,0 +1 @@
{"homeworkId":"hw-test-002","homeworkTitle":"降级路径测试","classId":"cls-test-002","className":"降级班级","subject":"物理","studentIds":["stu-test-003"],"dueDate":"2026-07-21"}