This library contains a sans-io implementation of the MQTT v5 protocol.
Contents:
- State machines appropriate for implementing MQTT clients and brokers
- Asynchronous client and broker implementations, compatible with both Trio and asyncio, via the AnyIO library
- Synchronous client implementation, implemented by using an asyncio event loop thread behind the scenes
While the provided client I/O implementations are intended for production use, the broker implementation should only be used in very lightweight scenarios where high performance or a broad feature set are not required. In those cases, broker implementations from vendors like EMQ 5417 X or HiveMQ are recommended instead.
The state machine implementation tries to adhere to the MQTT v5 protocol as tightly as possible, and this project has certain automatic safeguards to ensure correctness:
You can find the documentation here.