chore: keep active kafka path always on

This commit is contained in:
lingniu
2026-07-01 14:55:56 +08:00
parent 90791d28bd
commit faeee0c2a8
17 changed files with 23 additions and 25 deletions

View File

@@ -100,7 +100,7 @@ lingniu:
initialize-schema: ${VEHICLE_IDENTITY_MYSQL_INITIALIZE_SCHEMA:true}
sink:
kafka:
enabled: ${KAFKA_ENABLED:true}
enabled: true
bootstrap-servers: ${KAFKA_BROKERS:114.55.58.251:9092}
compression-type: zstd
linger-ms: 20

View File

@@ -42,7 +42,7 @@ class Gb32960IngestAppDefaultsTest {
"Hyundai")
.containsEntry("lingniu.ingest.gb32960.vendor-extensions[0].match.platform-accounts[1]",
"YueJin")
.containsEntry("lingniu.ingest.sink.kafka.enabled", "${KAFKA_ENABLED:true}")
.containsEntry("lingniu.ingest.sink.kafka.enabled", true)
.containsEntry("lingniu.ingest.sink.kafka.consumer.enabled", false)
.containsEntry("lingniu.ingest.sink.archive.enabled", "${SINK_ARCHIVE_ENABLED:true}")
.containsEntry("lingniu.ingest.sink.archive.path", "${SINK_ARCHIVE_PATH:./archive/}")
@@ -69,7 +69,8 @@ class Gb32960IngestAppDefaultsTest {
.contains("password: ${GB32960_PLATFORM_PWD_HYUNDAI:}")
.contains("password: ${GB32960_PLATFORM_PWD_YUEJIN:}")
.doesNotContain("SESSION_STORE")
.doesNotContain("VEHICLE_IDENTITY_STORE");
.doesNotContain("VEHICLE_IDENTITY_STORE")
.doesNotContain("KAFKA_ENABLED");
}
private static Properties applicationProperties() {

View File

@@ -64,7 +64,7 @@ lingniu:
initialize-schema: ${VEHICLE_IDENTITY_MYSQL_INITIALIZE_SCHEMA:true}
sink:
kafka:
enabled: ${KAFKA_ENABLED:true}
enabled: true
bootstrap-servers: ${KAFKA_BROKERS:114.55.58.251:9092}
compression-type: zstd
linger-ms: 20

View File

@@ -28,7 +28,7 @@ class Jt808IngestAppDefaultsTest {
.containsEntry("server.port", "${HTTP_PORT:20400}")
.containsEntry("lingniu.ingest.jt808.enabled", true)
.containsEntry("lingniu.ingest.jt808.port", "${JT808_PORT:808}")
.containsEntry("lingniu.ingest.sink.kafka.enabled", "${KAFKA_ENABLED:true}")
.containsEntry("lingniu.ingest.sink.kafka.enabled", true)
.containsEntry("lingniu.ingest.sink.kafka.consumer.enabled", false)
.containsEntry("lingniu.ingest.sink.kafka.topics.realtime", "${KAFKA_TOPIC_JT808_EVENT:vehicle.event.jt808.v1}")
.containsEntry("lingniu.ingest.sink.kafka.topics.raw-archive", "${KAFKA_TOPIC_JT808_RAW:vehicle.raw.jt808.v1}")
@@ -56,7 +56,8 @@ class Jt808IngestAppDefaultsTest {
.doesNotContain("vehicle-state:")
.doesNotContain("vehicle-stat:")
.doesNotContain("SESSION_STORE")
.doesNotContain("VEHICLE_IDENTITY_STORE");
.doesNotContain("VEHICLE_IDENTITY_STORE")
.doesNotContain("KAFKA_ENABLED");
}
private static Properties applicationProperties() {

View File

@@ -36,7 +36,7 @@ lingniu:
ingest:
sink:
kafka:
enabled: ${KAFKA_ENABLED:true}
enabled: true
bootstrap-servers: ${KAFKA_BROKERS:114.55.58.251:9092}
topics:
realtime: ${KAFKA_TOPIC_JT808_EVENT:vehicle.event.jt808.v1}

View File

@@ -26,6 +26,7 @@ class VehicleAnalyticsAppDefaultsTest {
.containsEntry(
"lingniu.ingest.vehicle-stat.jt808.enabled",
"${VEHICLE_STAT_JT808_MILEAGE_ENABLED:true}")
.containsEntry("lingniu.ingest.sink.kafka.enabled", true)
.containsEntry("lingniu.ingest.sink.kafka.consumer.enabled", "${KAFKA_CONSUMER_ENABLED:true}")
.containsEntry(
"lingniu.ingest.sink.kafka.consumer.bindings.vehicleStatEnvelopeConsumerProcessor.enabled",
@@ -51,7 +52,8 @@ class VehicleAnalyticsAppDefaultsTest {
.doesNotContain("event-file-store:")
.doesNotContain("vehicle-state:")
.doesNotContain("vehicleStateEnvelopeConsumerProcessor")
.doesNotContain("redis:");
.doesNotContain("redis:")
.doesNotContain("KAFKA_ENABLED");
}
private static Properties applicationProperties() {

View File

@@ -35,7 +35,7 @@ lingniu:
enabled: false
sink:
kafka:
enabled: ${KAFKA_ENABLED:true}
enabled: true
bootstrap-servers: ${KAFKA_BROKERS:114.55.58.251:9092}
topics:
realtime: ${KAFKA_TOPIC_GB32960_EVENT:vehicle.event.gb32960.v1}

View File

@@ -22,6 +22,7 @@ class PortainerComposeResourceLimitsTest {
assertThat(compose)
.contains("Default production stack: GB32960, JT808, Yutong MQTT, history, analytics.")
.contains("Legacy and optional services stay outside this compose file.")
.doesNotContain("KAFKA_ENABLED")
.doesNotContain("\n xinda-push-app:\n")
.doesNotContain("\n command-gateway:\n")
.doesNotContain("\n vehicle-state-service:\n")
@@ -632,7 +633,8 @@ class PortainerComposeResourceLimitsTest {
.contains("<key>NACOS_CONFIG_ENABLED</key>\n <string>false</string>")
.contains("<key>MANAGEMENT_HEALTH_REDIS_ENABLED</key>\n <string>false</string>")
.contains("/tmp/lingniu-" + serviceName + "-live/")
.doesNotContain("<key>VEHICLE_IDENTITY_STORE</key>");
.doesNotContain("<key>VEHICLE_IDENTITY_STORE</key>")
.doesNotContain("<key>KAFKA_ENABLED</key>");
}
private static String serviceBlock(String compose, String serviceName) {

View File

@@ -40,6 +40,7 @@ class VehicleHistoryAppDefaultsTest {
.containsEntry("lingniu.ingest.tdengine-history.maximum-pool-size", "${TDENGINE_MAX_POOL_SIZE:16}")
.containsEntry("lingniu.ingest.tdengine-history.minimum-idle", "${TDENGINE_MIN_IDLE:0}")
.containsEntry("lingniu.ingest.event-history.enabled", true)
.containsEntry("lingniu.ingest.sink.kafka.enabled", true)
.containsEntry("lingniu.ingest.sink.kafka.consumer.enabled", "${KAFKA_CONSUMER_ENABLED:true}")
.containsEntry("lingniu.ingest.sink.kafka.consumer.max-poll-records", "${KAFKA_CONSUMER_MAX_POLL_RECORDS:2000}")
.containsEntry("lingniu.ingest.sink.kafka.consumer.concurrency", "${KAFKA_CONSUMER_CONCURRENCY:3}")
@@ -111,7 +112,8 @@ class VehicleHistoryAppDefaultsTest {
.noneMatch(name -> name.equals("lingniu.ingest.tdengine-history.telemetry-fields-enabled"));
assertThat(applicationYaml())
.doesNotContain("\n archive:\n")
.doesNotContain("sink.archive");
.doesNotContain("sink.archive")
.doesNotContain("KAFKA_ENABLED");
}
@Test

View File

@@ -70,7 +70,7 @@ lingniu:
initialize-schema: ${VEHICLE_IDENTITY_MYSQL_INITIALIZE_SCHEMA:true}
sink:
kafka:
enabled: ${KAFKA_ENABLED:true}
enabled: true
bootstrap-servers: ${KAFKA_BROKERS:114.55.58.251:9092}
compression-type: zstd
linger-ms: 20

View File

@@ -28,7 +28,7 @@ class YutongMqttAppDefaultsTest {
.containsEntry("lingniu.ingest.mqtt.endpoints[0].uri", "${YUTONG_MQTT_URI:}")
.containsEntry("lingniu.ingest.mqtt.endpoints[0].topic", "${YUTONG_MQTT_TOPIC:#}")
.containsEntry("lingniu.ingest.mqtt.endpoints[0].profile", "yutong")
.containsEntry("lingniu.ingest.sink.kafka.enabled", "${KAFKA_ENABLED:true}")
.containsEntry("lingniu.ingest.sink.kafka.enabled", true)
.containsEntry("lingniu.ingest.sink.kafka.consumer.enabled", false)
.containsEntry("lingniu.ingest.sink.kafka.topics.realtime", "${KAFKA_TOPIC_YUTONG_MQTT_EVENT:vehicle.event.mqtt-yutong.v1}")
.containsEntry("lingniu.ingest.sink.kafka.topics.raw-archive", "${KAFKA_TOPIC_YUTONG_MQTT_RAW:vehicle.raw.mqtt-yutong.v1}")
@@ -49,7 +49,8 @@ class YutongMqttAppDefaultsTest {
.doesNotContain("event-file-store:")
.doesNotContain("vehicle-state:")
.doesNotContain("vehicle-stat:")
.doesNotContain("VEHICLE_IDENTITY_STORE");
.doesNotContain("VEHICLE_IDENTITY_STORE")
.doesNotContain("KAFKA_ENABLED");
}
private static Properties applicationProperties() {