Expand description
§MQTT Packet Codec
This module provides packet construction and serialization/deserialization for MQTT protocol. It handles the binary representation of MQTT packets but does NOT include:
- Network I/O operations
- Protocol state management
- Session handling
- Quality of Service guarantees
§Responsibilities
- Packet structure definitions for all MQTT versions (3.1, 3.1.1, 5.0)
- Encoding packets to wire format
- Decoding packets from wire format
- Basic protocol validation
§Supported MQTT Versions
| Version | Specification | Status | Notable Features |
|---|---|---|---|
| MQTT 3.1 | MQTT 3.1 | Full Support | Basic pub/sub, QoS 0-2 |
| MQTT 3.1.1 | MQTT 3.1.1 | Full Support | Clean session, Last Will |
| MQTT 5.0 | MQTT 5.0 | Full Support | Properties, Enhanced Auth |
§Feature Highlights
- Multi-Version Support: Single API for all MQTT versions
- Zero-Copy Parsing: Maximizes performance by minimizing allocations
- Protocol Bridging: Tools for interoperability between versions
- Validation: Strict protocol compliance checking
- Async Ready: Works seamlessly with async runtimes
Modules§
Enums§
- Error
- Represents errors that can occur when working with the MQTT protocol.