From 80c051e056e15568c00599a814501bc26fdb88a9 Mon Sep 17 00:00:00 2001 From: lingniu Date: Wed, 1 Jul 2026 15:36:44 +0800 Subject: [PATCH] chore: enforce kafka-only messaging surface --- .../2026-06-30-kafka-streaming-mileage.md | 2 +- .../historyapp/MavenModuleProfileTest.java | 27 +++++++++++++++++++ pom.xml | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/docs/superpowers/plans/2026-06-30-kafka-streaming-mileage.md b/docs/superpowers/plans/2026-06-30-kafka-streaming-mileage.md index 6132ecb2..1cfd6828 100644 --- a/docs/superpowers/plans/2026-06-30-kafka-streaming-mileage.md +++ b/docs/superpowers/plans/2026-06-30-kafka-streaming-mileage.md @@ -43,4 +43,4 @@ MYSQL_PASSWORD= ## Notes -Do not create or write a protocol-specific JT808 daily-mileage table. Do not add MQ, distance accumulation, integral calculation, Redis state, or memory state back into this path unless the mileage definition changes again. +Do not create or write a protocol-specific JT808 daily-mileage table. Do not add another message backbone, distance accumulation, integral calculation, Redis state, or memory state back into this path unless the mileage definition changes again. diff --git a/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/MavenModuleProfileTest.java b/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/MavenModuleProfileTest.java index 0636ee43..e2d68d02 100644 --- a/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/MavenModuleProfileTest.java +++ b/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/MavenModuleProfileTest.java @@ -382,12 +382,39 @@ class MavenModuleProfileTest { String description = firstDirectChild(pom.getDocumentElement(), "description").getTextContent(); assertThat(description) + .contains("只支持 Kafka") .contains("Java 25") .contains("Spring Boot " + projectProperty(pom, "spring-boot.version")) .contains("Netty " + projectProperty(pom, "netty.version")) .doesNotContain("Spring Boot 3.4"); } + @Test + void defaultProductionSurfaceOnlySupportsKafkaAsMessageBackbone() throws Exception { + List productionSurface = List.of( + repositoryRoot().resolve("README.md"), + repositoryRoot().resolve("pom.xml"), + repositoryRoot().resolve("deploy/portainer/docker-compose.yml"), + repositoryRoot().resolve("deploy/local/launchctl/README.md"), + repositoryRoot().resolve("docs/operations/gb32960-service-split-runbook.md"), + repositoryRoot().resolve("docs/operations/vehicle-ingest-tdengine-verification.md"), + repositoryRoot().resolve("docs/operations/jt808-daily-mileage-runbook.md"), + repositoryRoot().resolve("docs/target-architecture.md")); + + for (Path path : productionSurface) { + String text = Files.readString(path); + + assertThat(text) + .as(path.toString()) + .doesNotContain("sink-mq") + .doesNotContain("RabbitMQ") + .doesNotContain("RocketMQ") + .doesNotContain("Pulsar") + .doesNotContain("AMQP") + .doesNotContain("其他 MQ 后端"); + } + } + @Test void architectureDecisionsMatchCurrentDefaultProductionSurface() throws Exception { String decisions = Files.readString(repositoryRoot().resolve("DECISIONS.md")); diff --git a/pom.xml b/pom.xml index 787184ab..342f128a 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ lingniu-vehicle-ingest 羚牛车辆数据接入平台 v2。 - 模块化原子能力 + 协议解耦 + 业务/实时解耦 + 数据出 Kafka 不落业务库。 + 模块化原子能力 + 协议解耦 + 业务/实时解耦 + 生产链路只支持 Kafka。 Java 25 + Spring Boot 3.5.3 + Netty 4.2.9.Final + Disruptor + Virtual Threads。