diff --git a/deploy/local/launchctl/com.lingniu.gb32960.plist.template b/deploy/local/launchctl/com.lingniu.gb32960.plist.template index 4504950b..62e78b79 100644 --- a/deploy/local/launchctl/com.lingniu.gb32960.plist.template +++ b/deploy/local/launchctl/com.lingniu.gb32960.plist.template @@ -22,8 +22,6 @@ false GB32960_PLATFORM_IP_HYUNDAI 115.29.187.205 - KAFKA_ENABLED - true KAFKA_BROKERS 114.55.58.251:9092 KAFKA_NODE_ID diff --git a/deploy/local/launchctl/com.lingniu.jt808.plist.template b/deploy/local/launchctl/com.lingniu.jt808.plist.template index d99af421..f47fe057 100644 --- a/deploy/local/launchctl/com.lingniu.jt808.plist.template +++ b/deploy/local/launchctl/com.lingniu.jt808.plist.template @@ -18,8 +18,6 @@ 20400 JT808_PORT 808 - KAFKA_ENABLED - true KAFKA_BROKERS 114.55.58.251:9092 KAFKA_NODE_ID diff --git a/deploy/local/launchctl/com.lingniu.vehicle-analytics.plist.template b/deploy/local/launchctl/com.lingniu.vehicle-analytics.plist.template index 1627d77c..2d29d6be 100644 --- a/deploy/local/launchctl/com.lingniu.vehicle-analytics.plist.template +++ b/deploy/local/launchctl/com.lingniu.vehicle-analytics.plist.template @@ -16,8 +16,6 @@ HTTP_PORT 20300 - KAFKA_ENABLED - true KAFKA_CONSUMER_ENABLED true KAFKA_CONSUMER_AUTO_OFFSET_RESET diff --git a/deploy/local/launchctl/com.lingniu.vehicle-history.plist.template b/deploy/local/launchctl/com.lingniu.vehicle-history.plist.template index 4095673d..9dffad7d 100644 --- a/deploy/local/launchctl/com.lingniu.vehicle-history.plist.template +++ b/deploy/local/launchctl/com.lingniu.vehicle-history.plist.template @@ -16,8 +16,6 @@ HTTP_PORT 20200 - KAFKA_ENABLED - true KAFKA_CONSUMER_ENABLED true KAFKA_CONSUMER_AUTO_OFFSET_RESET diff --git a/deploy/local/launchctl/com.lingniu.yutong-mqtt.plist.template b/deploy/local/launchctl/com.lingniu.yutong-mqtt.plist.template index 25197fdd..f5031663 100644 --- a/deploy/local/launchctl/com.lingniu.yutong-mqtt.plist.template +++ b/deploy/local/launchctl/com.lingniu.yutong-mqtt.plist.template @@ -48,8 +48,6 @@ __YUTONG_MQTT_TLS_CLIENT_KEY__ YUTONG_MQTT_TLS_HOSTNAME_VERIFICATION_ENABLED __YUTONG_MQTT_TLS_HOSTNAME_VERIFICATION_ENABLED__ - KAFKA_ENABLED - true KAFKA_BROKERS 114.55.58.251:9092 KAFKA_NODE_ID diff --git a/deploy/portainer/docker-compose.yml b/deploy/portainer/docker-compose.yml index 3e9e3daa..c8bca16b 100644 --- a/deploy/portainer/docker-compose.yml +++ b/deploy/portainer/docker-compose.yml @@ -17,7 +17,6 @@ x-common-env: &common-env NACOS_USERNAME: ${NACOS_USERNAME:-} NACOS_PASSWORD: ${NACOS_PASSWORD:-} KAFKA_BROKERS: ${KAFKA_BROKERS:-172.17.111.56:9092} - KAFKA_ENABLED: ${KAFKA_ENABLED:-true} KAFKA_CONSUMER_ENABLED: ${KAFKA_CONSUMER_ENABLED:-true} KAFKA_CONSUMER_MAX_POLL_INTERVAL_MILLIS: ${KAFKA_CONSUMER_MAX_POLL_INTERVAL_MILLIS:-900000} KAFKA_TOPIC_GB32960_EVENT: ${KAFKA_TOPIC_GB32960_EVENT:-vehicle.event.gb32960.v1} diff --git a/modules/apps/gb32960-ingest-app/src/main/resources/application.yml b/modules/apps/gb32960-ingest-app/src/main/resources/application.yml index 9a2614c5..5065b8b6 100644 --- a/modules/apps/gb32960-ingest-app/src/main/resources/application.yml +++ b/modules/apps/gb32960-ingest-app/src/main/resources/application.yml @@ -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 diff --git a/modules/apps/gb32960-ingest-app/src/test/java/com/lingniu/ingest/gb32960app/Gb32960IngestAppDefaultsTest.java b/modules/apps/gb32960-ingest-app/src/test/java/com/lingniu/ingest/gb32960app/Gb32960IngestAppDefaultsTest.java index bb70c433..0b40ab84 100644 --- a/modules/apps/gb32960-ingest-app/src/test/java/com/lingniu/ingest/gb32960app/Gb32960IngestAppDefaultsTest.java +++ b/modules/apps/gb32960-ingest-app/src/test/java/com/lingniu/ingest/gb32960app/Gb32960IngestAppDefaultsTest.java @@ -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() { diff --git a/modules/apps/jt808-ingest-app/src/main/resources/application.yml b/modules/apps/jt808-ingest-app/src/main/resources/application.yml index 963af7ad..276b6443 100644 --- a/modules/apps/jt808-ingest-app/src/main/resources/application.yml +++ b/modules/apps/jt808-ingest-app/src/main/resources/application.yml @@ -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 diff --git a/modules/apps/jt808-ingest-app/src/test/java/com/lingniu/ingest/jt808app/Jt808IngestAppDefaultsTest.java b/modules/apps/jt808-ingest-app/src/test/java/com/lingniu/ingest/jt808app/Jt808IngestAppDefaultsTest.java index 8d8069e0..5407a2aa 100644 --- a/modules/apps/jt808-ingest-app/src/test/java/com/lingniu/ingest/jt808app/Jt808IngestAppDefaultsTest.java +++ b/modules/apps/jt808-ingest-app/src/test/java/com/lingniu/ingest/jt808app/Jt808IngestAppDefaultsTest.java @@ -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() { diff --git a/modules/apps/vehicle-analytics-app/src/main/resources/application.yml b/modules/apps/vehicle-analytics-app/src/main/resources/application.yml index 65934531..2024c976 100644 --- a/modules/apps/vehicle-analytics-app/src/main/resources/application.yml +++ b/modules/apps/vehicle-analytics-app/src/main/resources/application.yml @@ -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} diff --git a/modules/apps/vehicle-analytics-app/src/test/java/com/lingniu/ingest/analyticsapp/VehicleAnalyticsAppDefaultsTest.java b/modules/apps/vehicle-analytics-app/src/test/java/com/lingniu/ingest/analyticsapp/VehicleAnalyticsAppDefaultsTest.java index 1662a42a..f6f953a3 100644 --- a/modules/apps/vehicle-analytics-app/src/test/java/com/lingniu/ingest/analyticsapp/VehicleAnalyticsAppDefaultsTest.java +++ b/modules/apps/vehicle-analytics-app/src/test/java/com/lingniu/ingest/analyticsapp/VehicleAnalyticsAppDefaultsTest.java @@ -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() { diff --git a/modules/apps/vehicle-history-app/src/main/resources/application.yml b/modules/apps/vehicle-history-app/src/main/resources/application.yml index 21833dd2..648d4007 100644 --- a/modules/apps/vehicle-history-app/src/main/resources/application.yml +++ b/modules/apps/vehicle-history-app/src/main/resources/application.yml @@ -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} diff --git a/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/PortainerComposeResourceLimitsTest.java b/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/PortainerComposeResourceLimitsTest.java index 93baed7d..b71c0707 100644 --- a/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/PortainerComposeResourceLimitsTest.java +++ b/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/PortainerComposeResourceLimitsTest.java @@ -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("NACOS_CONFIG_ENABLED\n false") .contains("MANAGEMENT_HEALTH_REDIS_ENABLED\n false") .contains("/tmp/lingniu-" + serviceName + "-live/") - .doesNotContain("VEHICLE_IDENTITY_STORE"); + .doesNotContain("VEHICLE_IDENTITY_STORE") + .doesNotContain("KAFKA_ENABLED"); } private static String serviceBlock(String compose, String serviceName) { diff --git a/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/VehicleHistoryAppDefaultsTest.java b/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/VehicleHistoryAppDefaultsTest.java index fec38b7c..71589975 100644 --- a/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/VehicleHistoryAppDefaultsTest.java +++ b/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/VehicleHistoryAppDefaultsTest.java @@ -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 diff --git a/modules/apps/yutong-mqtt-app/src/main/resources/application.yml b/modules/apps/yutong-mqtt-app/src/main/resources/application.yml index c1c95eed..1cdb4d4c 100644 --- a/modules/apps/yutong-mqtt-app/src/main/resources/application.yml +++ b/modules/apps/yutong-mqtt-app/src/main/resources/application.yml @@ -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 diff --git a/modules/apps/yutong-mqtt-app/src/test/java/com/lingniu/ingest/yutongmqttapp/YutongMqttAppDefaultsTest.java b/modules/apps/yutong-mqtt-app/src/test/java/com/lingniu/ingest/yutongmqttapp/YutongMqttAppDefaultsTest.java index 8118922a..ebfa3c7e 100644 --- a/modules/apps/yutong-mqtt-app/src/test/java/com/lingniu/ingest/yutongmqttapp/YutongMqttAppDefaultsTest.java +++ b/modules/apps/yutong-mqtt-app/src/test/java/com/lingniu/ingest/yutongmqttapp/YutongMqttAppDefaultsTest.java @@ -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() {