From 4a32e2181ad05f2ed9e52de398b45ec646fb7f8d Mon Sep 17 00:00:00 2001 From: lingniu Date: Wed, 1 Jul 2026 22:56:55 +0800 Subject: [PATCH] docs: record gateway publish retry deployment --- ...-gateway-verification-result-2026-07-01.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/docs/operations/go-vehicle-gateway-verification-result-2026-07-01.md b/docs/operations/go-vehicle-gateway-verification-result-2026-07-01.md index 1f437231..a574e482 100644 --- a/docs/operations/go-vehicle-gateway-verification-result-2026-07-01.md +++ b/docs/operations/go-vehicle-gateway-verification-result-2026-07-01.md @@ -240,3 +240,71 @@ LKLG7C4E3NA774736 | JT808 | 2026-07-01 | daily_total_mileage_km | 0.000 | sample ``` 说明:该真实位置帧携带的表 27 附加项 `0x01` 总里程值为 `0`,因此本次只验证身份解析、链路落地和差值统计写入;要验证非零日里程,需要回放或等待同一 VIN 的非零总里程连续位置点。 + +## 2026-07-01 22:55 Kafka 发布重试部署复验 + +部署版本已更新: + +- Git commit:`7e7066d` +- 镜像:`crpi-85r4m0ackrm3qpje.cn-shanghai.personal.cr.aliyuncs.com/oneos/vehicle-gateway-go:go-7e7066d-20260701225503` + +本轮修复内容: + +- gateway 的 Kafka 发布增加同步重试封装。 +- 默认配置: + - `KAFKA_PUBLISH_ATTEMPTS=3` + - `KAFKA_PUBLISH_BACKOFF_MS=100` + - `KAFKA_PUBLISH_TIMEOUT_MS=3000` +- RAW 仍先于 unified event 写入;RAW 写失败不会继续写 unified。 +- 单元测试覆盖首次失败后成功、重试耗尽返回错误、上下文取消时停止重试。 + +部署后容器状态: + +```text +go-vehicle-gateway | go-7e7066d-20260701225503 | Up +go-history-writer | go-7e7066d-20260701225503 | Up +go-stat-writer | go-7e7066d-20260701225503 | Up +go-realtime-api | go-7e7066d-20260701225503 | Up +``` + +真实 808 帧回放复验: + +```text +source_endpoint=172.20.0.1:51966 +protocol=JT808 +message_id=0x0200 +phone=013079963379 +vin=LKLG7C4E3NA774736 +parsed.identity.value=13079963379 +``` + +Kafka `vehicle.raw.go.jt808.v1` 确认新消息写入,partition 6 offset 从 `1` 增加到 `2`。最新消息包含: + +```text +received_at_ms=1782917751903 +source_endpoint=172.20.0.1:51966 +vin=LKLG7C4E3NA774736 +fields.longitude=119.557997 +fields.latitude=29.049092 +fields.total_mileage_km=0 +``` + +TDengine `raw_frames` 确认新 RAW 落地: + +```text +2026-07-01 14:55:51.903 | JT808 | LKLG7C4E3NA774736 | phone=013079963379 | source=172.20.0.1:51966 +``` + +Realtime API 确认 Redis 已刷新: + +```text +GET /api/realtime/vehicles/LKLG7C4E3NA774736 + +received_at_ms=1782917751903 +source_endpoint=172.20.0.1:51966 +longitude=119.557997 +latitude=29.049092 +total_mileage_km=0 +``` + +说明:当前重试层只能覆盖 Kafka 短暂抖动;如果 Kafka 长时间不可用,仍需后续增加本地磁盘 spool/WAL 和恢复补发。