Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 2.09 KB

File metadata and controls

35 lines (29 loc) · 2.09 KB

Repository Guidelines

Project Structure & Module Organization

  • 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.md and MQTT5_DESIGN.md: Implementation notes and MQTT 5 design references.
  • target/: Maven build output (generated).

Build, Test, and Development Commands

  • 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 into target/dependency for deployment.

Coding Style & Naming Conventions

  • 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.mqtt and org.eclipse.moquette namespaces.
  • No formatter or lint tool is configured; avoid reformatting unrelated code.

Testing Guidelines

  • Framework: JUnit 4 (org.junit.*) in src/test/java.
  • Interop tests (MosquittoInteropTest) require mosquitto_pub/mosquitto_sub on PATH and env vars:
    • MQTT_BROKER_HOST, MQTT_BROKER_PORT, and optionally MQTT_AUTH_USER, MQTT_AUTH_PASS, MQTT_AUTH_METHOD.
  • No coverage threshold is defined; add focused tests for behavior changes.

Commit & Pull Request Guidelines

  • 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).

Configuration & Security Tips

  • MQTT broker settings are configured via Spring XML (red5.xml), including dbStorePath and TLS options.
  • Do not commit secrets (password files, keystores); document required paths and env vars instead.