perf(cmpp): decouple supplier result callbacks

This commit is contained in:
hectorzhao
2026-08-20 14:19:42 +08:00
parent 485af688d2
commit 67b760a599
27 changed files with 1000 additions and 66 deletions
@@ -0,0 +1,24 @@
{
"schemaVersion": "v1",
"eventId": "submit:submit-20260820-0001:aggregate",
"eventType": "submit_result",
"path": "/gateway/events/submit-result",
"traceId": "trace-20260820-0001",
"messageId": "message-20260820-0001",
"channelId": "channel-test-1",
"submitId": "submit-20260820-0001",
"payload": {
"eventId": "submit:submit-20260820-0001:aggregate",
"schemaVersion": "v1",
"messageType": "SubmitResult",
"traceId": "trace-20260820-0001",
"messageId": "message-20260820-0001",
"channelId": "channel-test-1",
"createdAt": "2026-08-20T05:00:00Z",
"sequenceId": 1,
"gatewayMessageId": "1000000000000001",
"submitStatus": "accepted",
"submittedAt": "2026-08-20T05:00:00Z"
},
"createdAt": "2026-08-20T05:00:00Z"
}
@@ -6,7 +6,8 @@
{ "$ref": "#/$defs/SubmitCommand" },
{ "$ref": "#/$defs/SubmitResult" },
{ "$ref": "#/$defs/ReceiptEvent" },
{ "$ref": "#/$defs/UplinkEvent" }
{ "$ref": "#/$defs/UplinkEvent" },
{ "$ref": "#/$defs/SubmitResultOutboxEvent" }
],
"$defs": {
"Envelope": {
@@ -139,6 +140,26 @@
}
]
},
"SubmitResultOutboxEvent": {
"type": "object",
"required": ["schemaVersion", "eventId", "eventType", "path", "messageId", "channelId", "submitId", "payload", "createdAt"],
"properties": {
"schemaVersion": { "const": "v1" },
"eventId": { "type": "string", "pattern": "^submit:.+:(aggregate|segment:[1-9][0-9]*)$" },
"eventType": { "enum": ["submit_result", "submit_segment_result"] },
"path": { "enum": ["/gateway/events/submit-result", "/gateway/events/submit-segment-result"] },
"traceId": { "type": "string" },
"messageId": { "type": "string", "minLength": 1 },
"channelId": { "type": "string", "minLength": 1 },
"submitId": { "type": "string", "minLength": 1 },
"payload": {
"type": "object",
"required": ["eventId"],
"properties": { "eventId": { "type": "string", "minLength": 1 } }
},
"createdAt": { "type": "string", "format": "date-time" }
}
},
"ReceiptEvent": {
"allOf": [
{ "$ref": "#/$defs/Envelope" },
@@ -17,7 +17,7 @@
{
"name": "handleSubmitResult",
"file": "send-gateway-result.service.ts",
"bodySha256": "6184170748eb3934496b060ea3b6704f1d1a831e7ffde7e7f8b73a7c223a869c"
"bodySha256": "9414f8d4e5e1c3cf6d0747e47ce01e101e142772af4f56900932bc6d4ac11ec7"
},
{
"name": "resolveSubmitRecordForGatewayResult",
+3 -3
View File
@@ -173,7 +173,7 @@
"name": "Manager",
"kind": "type",
"file": "manager.go",
"sha256": "c7ead8b037bc87ad9800650ce191f5fcee9648b8805a133b9506743c762ea608"
"sha256": "b08726201c34da87ae735abd7fc56d2b904104d4b7f6a6a6365263ec5b0a43bc"
},
{
"name": "defaultChannelConnectionID",
@@ -389,7 +389,7 @@
"kind": "func",
"receiver": "Manager",
"file": "submit.go",
"sha256": "a25d30aeb87c1fe123929330fdabc99261e63d5b51e1cb6207197c43a15de07d"
"sha256": "9be92b0d32626ce93d0b2d721bf008305c4b9e5919e287d49b91c6f2474ddeb1"
},
{
"name": "submitPart",
@@ -410,7 +410,7 @@
"kind": "func",
"receiver": "connectionPool",
"file": "submit.go",
"sha256": "e3dbf2d433ef4ff95b2fe7a8494b17c6a8e185bdace017cce9c7d2e8c785bfb3"
"sha256": "577b7f942f4b95ea3868d7cf9aadae800df8edda0e7ca94a205b4124be58e9e3"
},
{
"name": "defaultInt",