refactor: make event file store optional

This commit is contained in:
lingniu
2026-07-01 07:51:45 +08:00
parent 51b1dd4174
commit 56a6c01f95
32 changed files with 139 additions and 84 deletions

View File

@@ -50,7 +50,7 @@ lingniu-vehicle-ingest/
│ ├── sinks/
│ │ ├── sink-mq/ Kafka producer + Protobuf Envelope
│ │ ├── sink-archive/ 原始报文冷存
│ │ └── event-file-store/ 可选兼容索引(旧 Parquet/DuckDB 路径)
│ │ └── event-file-store/ 可选兼容索引(旧 Parquet/DuckDB 路径,仅 -Poptional-event-file-store 显式构建
│ ├── services/
│ │ ├── event-history-service/ Kafka 全字段事件消费 + 历史查询/导出
│ │ ├── vehicle-state-service/ Kafka 全字段事件消费 + Redis 热状态查询optional-latest-state profile
@@ -82,6 +82,8 @@ JSATL12 附件上传不在默认 Maven reactor 中;需要时使用 `-Poptional
Redis 最新状态查询不在默认 Maven reactor 中;需要时使用 `-Poptional-latest-state` 构建 `vehicle-state-service`
旧 Parquet/DuckDB 事件索引不在默认 Maven reactor 中;需要兼容排查时使用 `-Poptional-event-file-store` 构建 `event-file-store`
## 迁移说明
本项目是 `lingniu-vehicle-data-reception` 的 v2 重构,采用 strangler fig 渐进式迁移,旧项目保留只读参考。迁移路径与决策参见 `../REFRACTOR_PLAN.md`
@@ -98,4 +100,4 @@ Redis 最新状态查询不在默认 Maven reactor 中;需要时使用 `-Popti
2. **协议即插拔**:每个 `protocol-*` / `inbound-*` 都可独立开关(`lingniu.ingest.<name>.enabled`
3. **顺序保证**:同一 VIN 严格有序Disruptor hash + Kafka 分区 key
4. **幂等消费**Envelope 带 `eventId`,下游去重
5. **原始可回放**:协议接入会把 `rawArchiveKey/rawArchiveUri` 追加到事件 metadataKafka Envelope、TDengine `raw_frames` 和导出都使用 `archive://...` 逻辑 URI 追溯原始 bytes实际文件由 `sink-archive` 管理;`event-file-store` 仅作为旧 Parquet/DuckDB 查询索引兼容路径,不是默认生产历史库
5. **原始可回放**:协议接入会把 `rawArchiveKey/rawArchiveUri` 追加到事件 metadataKafka Envelope、TDengine `raw_frames` 和导出都使用 `archive://...` 逻辑 URI 追溯原始 bytes实际文件由 `sink-archive` 管理;`event-file-store` 仅作为旧 Parquet/DuckDB 查询索引兼容路径,通过 `optional-event-file-store` profile 显式构建,不是默认生产历史库