From 371b89aeb0126b4f8551c7a0c0b4c0ec365cf04e Mon Sep 17 00:00:00 2001 From: lingniu Date: Wed, 1 Jul 2026 03:57:41 +0800 Subject: [PATCH] deploy: make yutong mqtt opt-in --- deploy/portainer/docker-compose.yml | 5 +++-- .../yutongmqttapp/YutongMqttPortainerComposeTest.java | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/deploy/portainer/docker-compose.yml b/deploy/portainer/docker-compose.yml index af9e3bbe..c677a74e 100644 --- a/deploy/portainer/docker-compose.yml +++ b/deploy/portainer/docker-compose.yml @@ -95,7 +95,8 @@ services: environment: <<: *common-env HTTP_PORT: 20500 - YUTONG_MQTT_ENABLED: ${YUTONG_MQTT_ENABLED:-true} + YUTONG_MQTT_ENABLED: ${YUTONG_MQTT_ENABLED:-false} + YUTONG_MQTT_AUTO_STARTUP: ${YUTONG_MQTT_AUTO_STARTUP:-true} KAFKA_CONSUMER_ENABLED: "false" KAFKA_NODE_ID: ${KAFKA_NODE_ID_MQTT:-yutong-mqtt-portainer} VEHICLE_IDENTITY_STORE: ${VEHICLE_IDENTITY_STORE:-mysql} @@ -103,7 +104,7 @@ services: VEHICLE_IDENTITY_MYSQL_USERNAME: ${MYSQL_USERNAME:-} VEHICLE_IDENTITY_MYSQL_PASSWORD: ${MYSQL_PASSWORD:-} YUTONG_MQTT_ENDPOINT_NAME: ${YUTONG_MQTT_ENDPOINT_NAME:-yutong} - YUTONG_MQTT_URI: ${YUTONG_MQTT_URI:-tcp://127.0.0.1:1883} + YUTONG_MQTT_URI: ${YUTONG_MQTT_URI:-} YUTONG_MQTT_TOPIC: "${YUTONG_MQTT_TOPIC:-#}" YUTONG_MQTT_QOS: ${YUTONG_MQTT_QOS:-1} YUTONG_MQTT_CLIENT_ID: ${YUTONG_MQTT_CLIENT_ID:-lingniu-yutong-mqtt} diff --git a/modules/apps/yutong-mqtt-app/src/test/java/com/lingniu/ingest/yutongmqttapp/YutongMqttPortainerComposeTest.java b/modules/apps/yutong-mqtt-app/src/test/java/com/lingniu/ingest/yutongmqttapp/YutongMqttPortainerComposeTest.java index fa8f7961..cd23bbd4 100644 --- a/modules/apps/yutong-mqtt-app/src/test/java/com/lingniu/ingest/yutongmqttapp/YutongMqttPortainerComposeTest.java +++ b/modules/apps/yutong-mqtt-app/src/test/java/com/lingniu/ingest/yutongmqttapp/YutongMqttPortainerComposeTest.java @@ -18,9 +18,11 @@ class YutongMqttPortainerComposeTest { .contains("KAFKA_TOPIC_YUTONG_MQTT_EVENT:") .contains("KAFKA_TOPIC_YUTONG_MQTT_RAW:") .contains("KAFKA_TOPIC_YUTONG_MQTT_DLQ:") - .contains("YUTONG_MQTT_ENABLED: ${YUTONG_MQTT_ENABLED:-true}") - .contains("YUTONG_MQTT_URI: ${YUTONG_MQTT_URI:-tcp://127.0.0.1:1883}") + .contains("YUTONG_MQTT_ENABLED: ${YUTONG_MQTT_ENABLED:-false}") + .contains("YUTONG_MQTT_AUTO_STARTUP: ${YUTONG_MQTT_AUTO_STARTUP:-true}") + .contains("YUTONG_MQTT_URI: ${YUTONG_MQTT_URI:-}") .contains("YUTONG_MQTT_TOPIC: \"${YUTONG_MQTT_TOPIC:-#}\"") + .doesNotContain("YUTONG_MQTT_URI: ${YUTONG_MQTT_URI:-tcp://127.0.0.1:1883}") .doesNotContain("KAFKA_TOPIC_PARTNER_EVENT") .doesNotContain("KAFKA_TOPIC_PARTNER_RAW") .doesNotContain("KAFKA_TOPIC_PARTNER_DLQ")