-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Decouple mqtt from iotdb-server using ExternalService framework #17042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Weihao Li <18110526956@163.com>
| "org.apache.iotdb.externalservice.Mqtt", | ||
| // IoTDBDescriptor.getInstance().getConfig()::isEnableMQTTService | ||
| () -> false), | ||
| MQTT("MQTT", "org.apache.iotdb.mqtt.MQTTService", () -> true), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| MQTT("MQTT", "org.apache.iotdb.mqtt.MQTTService", () -> true), | |
| MQTT("MQTT", "org.apache.iotdb.mqtt.MQTTService", IoTDBDescriptor.getInstance().getConfig()::isEnableMQTTService), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request refactors the MQTT service from a built-in component of iotdb-server to an external service using the ExternalService framework. This change improves modularity by separating MQTT functionality into its own deployable module.
Changes:
- Created new
external-service-impl/mqttmodule with MQTT service implementation - Removed MQTT dependencies from iotdb-core/datanode module
- Updated package structure from
org.apache.iotdb.db.protocol.mqtttoorg.apache.iotdb.mqtt - Added lifecycle management for external services in DataNode
- Updated build and distribution configurations to package MQTT as a separate jar
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Added external-service-impl module to the reactor build |
| ServiceType.java | Removed MQTT_SERVICE enum value as MQTT is now external |
| ExternalServiceManagementService.java | Enhanced service lifecycle management with directory creation, service restoration, and stop functionality |
| BuiltinExternalServices.java | Updated MQTT and REST service class names for external service framework |
| DataNode.java | Modified initialization to use external service framework and added service cleanup on shutdown |
| iotdb-core/datanode/pom.xml | Removed MQTT-related dependencies (netty-codec-mqtt, moquette-broker) |
| external-service-impl/pom.xml | New parent POM for external service implementations |
| external-service-impl/mqtt/pom.xml | New MQTT module with dependencies and jar-with-dependencies packaging |
| external-service-impl/mqtt/src/main/java/**/*.java | Moved and refactored MQTT implementation classes to new package structure |
| external-service-impl/mqtt/src/test/java/**/*.java | Migrated and cleaned up MQTT test classes |
| distribution/*.xml | Updated assembly descriptors to include MQTT jar in distributions |
| example/mqtt-customize/** | Updated example to reference new MQTT package structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../main/java/org/apache/iotdb/db/service/externalservice/ExternalServiceManagementService.java
Show resolved
Hide resolved
.../main/java/org/apache/iotdb/db/service/externalservice/ExternalServiceManagementService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/iotdb/db/service/externalservice/ExternalServiceManagementService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/iotdb/db/service/externalservice/ExternalServiceManagementService.java
Outdated
Show resolved
Hide resolved
...anode/src/main/java/org/apache/iotdb/db/service/externalservice/BuiltinExternalServices.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/iotdb/db/service/externalservice/ExternalServiceManagementService.java
Outdated
Show resolved
Hide resolved
...anode/src/main/java/org/apache/iotdb/db/service/externalservice/BuiltinExternalServices.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #17042 +/- ##
============================================
- Coverage 39.29% 39.27% -0.02%
- Complexity 212 282 +70
============================================
Files 5104 5105 +1
Lines 341498 341552 +54
Branches 43522 43535 +13
============================================
- Hits 134181 134161 -20
- Misses 207317 207391 +74 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Weihao Li <18110526956@163.com>
Signed-off-by: Weihao Li <18110526956@163.com>
|


No description provided.