src/main/java/org/red5/server/mqtt: Red5 MQTT plugin entry points, transport, and broker integration.src/main/java/org/eclipse/moquette: Embedded Moquette-derived broker implementation.src/test/java: JUnit 4 tests, including codec, persistence, and interop tests.docs/: Additional documentation (if present).IMPLEMENTERS.mdandMQTT5_DESIGN.md: Implementation notes and MQTT 5 design references.target/: Maven build output (generated).
mvn -Dmaven.test.skip=true -Dmaven.javadoc.skip=true package: Build the plugin JAR quickly (skips tests).mvn -DskipTests=false test: Run the full test suite.mvn dependency:copy-dependencies: Download runtime dependencies intotarget/dependencyfor deployment.
- Language level is Java 21 (see
pom.xml). - Indentation uses tabs in existing sources; follow surrounding style and alignment.
- Keep package naming consistent with
org.red5.server.mqttandorg.eclipse.moquettenamespaces. - No formatter or lint tool is configured; avoid reformatting unrelated code.
- Framework: JUnit 4 (
org.junit.*) insrc/test/java. - Interop tests (
MosquittoInteropTest) requiremosquitto_pub/mosquitto_subon PATH and env vars:MQTT_BROKER_HOST,MQTT_BROKER_PORT, and optionallyMQTT_AUTH_USER,MQTT_AUTH_PASS,MQTT_AUTH_METHOD.
- No coverage threshold is defined; add focused tests for behavior changes.
- Git history is minimal (single initial commit), so no enforced commit convention exists.
- Use concise, imperative commit messages (e.g., "Fix session cleanup on disconnect").
- PRs should include: a brief summary, testing performed (commands), and any config changes (e.g.,
red5.xml).
- MQTT broker settings are configured via Spring XML (
red5.xml), includingdbStorePathand TLS options. - Do not commit secrets (password files, keystores); document required paths and env vars instead.