Skip to content

feat(channels): add MQTT pub/sub channel adapter#382

Open
tianrking wants to merge 1 commit intoRightNow-AI:mainfrom
tianrking:main
Open

feat(channels): add MQTT pub/sub channel adapter#382
tianrking wants to merge 1 commit intoRightNow-AI:mainfrom
tianrking:main

Conversation

@tianrking
Copy link

MQTT is a lightweight messaging protocol widely used in IoT scenarios. This adapter enables OpenFang to receive and respond to messages via MQTT brokers, making it suitable for:

  • IoT device integration and control
  • Low-bandwidth/high-latency network environments
  • Real-time pub/sub messaging systems
  • Edge computing scenarios

The implementation includes:

  • Configurable QoS levels (0, 1, 2)
  • TLS/SSL support for secure connections
  • Automatic reconnection with exponential backoff
  • JSON and plain text payload parsing
  • Topic-based routing for replies

Configuration example added to README.md with usage instructions.

Summary

Changes

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

MQTT is a lightweight messaging protocol widely used in IoT scenarios.
This adapter enables OpenFang to receive and respond to messages via
MQTT brokers, making it suitable for:

- IoT device integration and control
- Low-bandwidth/high-latency network environments
- Real-time pub/sub messaging systems
- Edge computing scenarios

The implementation includes:
- Configurable QoS levels (0, 1, 2)
- TLS/SSL support for secure connections
- Automatic reconnection with exponential backoff
- JSON and plain text payload parsing
- Topic-based routing for replies

Configuration example added to README.md with usage instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant