refactor: remove xinda from default production surface
This commit is contained in:
@@ -85,7 +85,6 @@ services:
|
||||
<<: *common-env
|
||||
HTTP_PORT: 20500
|
||||
MQTT_ENABLED: "true"
|
||||
XINDA_PUSH_ENABLED: "false"
|
||||
KAFKA_CONSUMER_ENABLED: "false"
|
||||
KAFKA_NODE_ID: ${KAFKA_NODE_ID_MQTT:-yutong-mqtt-portainer}
|
||||
KAFKA_TOPIC_PARTNER_EVENT: ${KAFKA_TOPIC_MQTT_EVENT:-vehicle.event.mqtt-yutong.v1}
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
<h2>一、系统定位</h2>
|
||||
<p>
|
||||
当前项目不是业务库写入服务。它的核心职责是把 GB/T 32960、JT/T 808、JT/T 1078、JSATL12、
|
||||
MQTT、信达 Push 等不同来源的车辆数据统一转换为 <code>VehicleEvent</code> 和全字段 <code>TelemetrySnapshot</code>,
|
||||
MQTT 等不同来源的车辆数据统一转换为 <code>VehicleEvent</code> 和全字段 <code>TelemetrySnapshot</code>,
|
||||
再通过 Kafka、原始报文归档、Parquet 明细文件库、Redis 热状态和独立统计模块交给下游业务。
|
||||
</p>
|
||||
<div class="summary-grid">
|
||||
@@ -289,7 +289,6 @@ flowchart TB
|
||||
subgraph external["外部来源"]
|
||||
vehicle["车辆终端<br/>GB/T 32960 / JT808 / JT1078"]
|
||||
mqttSource["车企或平台 MQTT"]
|
||||
xindaSource["信达 Push"]
|
||||
commandClient["业务系统 / 运维平台<br/>HTTP 下行命令"]
|
||||
end
|
||||
|
||||
@@ -303,7 +302,6 @@ flowchart TB
|
||||
subgraph inbound["入口适配 modules/inbound"]
|
||||
mqtt["inbound-mqtt<br/>MQTT endpoint 生命周期、PEM TLS"]
|
||||
mqttProfile["MqttProfileRegistry<br/>按 endpoint profile 解析/映射"]
|
||||
xinda["inbound-xinda-push<br/>HTTP Push 适配"]
|
||||
end
|
||||
|
||||
subgraph protocolBase["核心与公共能力 modules/core"]
|
||||
@@ -341,7 +339,6 @@ flowchart TB
|
||||
mqttSource --> mqtt
|
||||
mqtt --> mqttProfile
|
||||
mqttProfile --> api
|
||||
xindaSource --> xinda
|
||||
commandClient --> gateway
|
||||
|
||||
gb --> codec
|
||||
@@ -351,8 +348,6 @@ flowchart TB
|
||||
|
||||
gb --> api
|
||||
jt808 --> api
|
||||
xinda --> api
|
||||
xinda --> dispatcher
|
||||
jsatl12 --> archive
|
||||
jsatl12 --> jt808
|
||||
|
||||
@@ -371,7 +366,6 @@ flowchart TB
|
||||
session --> gb
|
||||
identity --> jt808
|
||||
identity --> mqttProfile
|
||||
identity --> xinda
|
||||
|
||||
obs -.监控.-> dispatcher
|
||||
obs -.监控.-> bus
|
||||
@@ -379,7 +373,6 @@ flowchart TB
|
||||
bootall -.装配.-> gb
|
||||
bootall -.装配.-> jt808
|
||||
bootall -.装配.-> mqtt
|
||||
bootall -.装配.-> xinda
|
||||
bootall -.装配.-> mq
|
||||
bootall -.装配.-> archive
|
||||
bootall -.装配.-> fileStore
|
||||
@@ -393,7 +386,7 @@ flowchart TB
|
||||
classDef command fill:#f5f3ff,stroke:#6d28d9,color:#4c1d95;
|
||||
classDef support fill:#f8fafc,stroke:#64748b,color:#334155;
|
||||
|
||||
class gb,jt808,jt1078,jsatl12,mqtt,mqttProfile,xinda entry;
|
||||
class gb,jt808,jt1078,jsatl12,mqtt,mqttProfile entry;
|
||||
class api,registry,dispatcher,bus,identity core;
|
||||
class mq,archive,fileStore sink;
|
||||
class gateway,session command;
|
||||
@@ -580,13 +573,6 @@ flowchart LR
|
||||
<td>统一 RawFrame、Realtime、Location、Passthrough。</td>
|
||||
<td><span class="tag">车企平台接入</span><span class="tag green">profile 扩展</span><span class="tag green">身份映射</span><span class="tag green">双向 TLS</span><span class="tag green">错误隔离</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>modules/inbound/inbound-xinda-push</td>
|
||||
<td>信达 Push 接入适配,基于 PushClient 接收真实协议帧并统一转换为 RawFrame;入站 RawFrame 和事件映射均接入统一车辆身份解析,冷存和事件 metadata 均携带内部 vin,并保留 externalVin、phone、deviceId、plateNo、identityResolved、identitySource;0200 映射 Location,并将 totalMileage、mileage 等里程别名归一为内部字段 <code>total_mileage_km</code>;0300 映射标准 AlarmPayload,氢气泄漏类报警统一提升为 HYDROGEN_LEAK/CRITICAL 并标记 hydrogenLeakDetected、hydrogenLeakActionRequired,报警元数据保留 alarmType、alarmName、alarmLevel;未知业务 cmd、非法十六进制 cmd、JSON 异常、身份解析/业务处理异常、启动配置缺失、启动异常、登录拒绝和坏登录应答均兜底为 Passthrough,运行类错误按 vin=unknown、identityResolved=false、identitySource=UNKNOWN 归档,非法 cmd 命令码归零并标记 malformedCommand,业务消息 JSON 异常会在 RawArchive metadata 和最终 Passthrough 事件同时保留 parseErrorMessage,业务处理异常会保留原始 payload 并标记 operationalError、phase=message 和 reason,便于归档追溯。</td>
|
||||
<td>信达 Push payload。</td>
|
||||
<td>RawFrame、Location、Passthrough、operational error。</td>
|
||||
<td><span class="tag">第三方平台接入</span><span class="tag green">统一 Dispatcher</span><span class="tag green">身份映射</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>modules/sinks/sink-mq</td>
|
||||
<td>Kafka Sink。把 VehicleEvent 转成 Protobuf Envelope,按 VIN 分区投递;业务事件携带全字段 TelemetrySnapshot 和 rawArchiveUri,显式 RawArchive Envelope 会填充 archive:// 逻辑 URI 与 size,默认 Kafka Sink 仍不发送原始 bytes 本体;同时提供 KafkaEnvelopeConsumerFactory、KafkaEnvelopeConsumerRunner、KafkaEnvelopeConsumerWorker 和 KafkaEnvelopeDeadLetterSink,统一服务侧 Kafka 消费启动、独立 group 绑定、死信发布和 topic 到 EnvelopeConsumerProcessor 的分发。</td>
|
||||
|
||||
@@ -44,11 +44,11 @@ public final class LocationHistoryController {
|
||||
summary = "查询车辆位置历史",
|
||||
description = "按协议、车辆标识和时间范围查询 TDengine 位置点。分页使用 cursorTs + cursorId,不使用 offset。")
|
||||
public LocationPageResponse locations(
|
||||
@Parameter(description = "协议名,例如 GB32960、JT808、MQTT_YUTONG、XINDA_PUSH。", required = true, example = "MQTT_YUTONG")
|
||||
@Parameter(description = "协议名,例如 GB32960、JT808、MQTT_YUTONG。", required = true, example = "MQTT_YUTONG")
|
||||
@RequestParam String protocol,
|
||||
@Parameter(description = "内部车辆键。传入后优先使用。", example = "LMRKH9AC2R1004087")
|
||||
@RequestParam(required = false) String vehicleKey,
|
||||
@Parameter(description = "VIN。GB32960、宇通、信达通常可直接用 VIN。", example = "LMRKH9AC2R1004087")
|
||||
@Parameter(description = "VIN。GB32960、宇通通常可直接用 VIN。", example = "LMRKH9AC2R1004087")
|
||||
@RequestParam(required = false) String vin,
|
||||
@Parameter(description = "JT808 终端手机号或终端标识;JT808 会自动映射为 jt808:<phone>。", example = "g7gps")
|
||||
@RequestParam(required = false) String phone,
|
||||
|
||||
@@ -57,7 +57,7 @@ public final class RawFrameHistoryController {
|
||||
description = "按 protocol、vehicleKey、VIN、phone、messageId、parseStatus 和时间范围查询 TDengine raw_frames。"
|
||||
+ "返回 metadataJson 与 rawUri,分页使用 cursorTs + cursorId。")
|
||||
public RawFramePageResponse rawFrames(
|
||||
@Parameter(description = "协议类型,例如 GB32960、JT808、MQTT_YUTONG、XINDA_PUSH。", example = "JT808")
|
||||
@Parameter(description = "协议类型,例如 GB32960、JT808、MQTT_YUTONG。", example = "JT808")
|
||||
@RequestParam String protocol,
|
||||
@Parameter(description = "内部车辆键;传入后精确过滤 vehicle_key。", example = "jt808:g7gps")
|
||||
@RequestParam(required = false) String vehicleKey,
|
||||
|
||||
24
pom.xml
24
pom.xml
@@ -52,6 +52,20 @@
|
||||
<module>modules/inbound/inbound-xinda-push</module>
|
||||
<module>modules/apps/xinda-push-app</module>
|
||||
</modules>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.lingniu.ingest</groupId>
|
||||
<artifactId>inbound-xinda-push</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lingniu.ingest</groupId>
|
||||
<artifactId>xinda-push-app</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
@@ -253,11 +267,6 @@
|
||||
<artifactId>inbound-mqtt</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lingniu.ingest</groupId>
|
||||
<artifactId>inbound-xinda-push</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lingniu.ingest</groupId>
|
||||
<artifactId>command-gateway</artifactId>
|
||||
@@ -278,11 +287,6 @@
|
||||
<artifactId>yutong-mqtt-app</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lingniu.ingest</groupId>
|
||||
<artifactId>xinda-push-app</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lingniu.ingest</groupId>
|
||||
<artifactId>vehicle-history-app</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user