- MQTT v3.1.1, v5.0 packet serialization/deserialization
- TokioAsyncMqttClient (v5.0) with dual API (async/sync)
- Builder pattern
- MQTT v5 flow control (Receive Maximum, Topic Alias Maximum)
- Raw Packet API for protocol testing
- Comprehensive documentation
- Protocol testing infrastructure (84% coverage achievable)
- TLS/SSL support
- QUIC support (single stream)
- C FFI Layer (Standard, TLS, QUIC) with native Event API
- Authentication method support
- More TLS configs
- MQTT Protocol compliance test implementation (0/185 tests)
- Phase 1: Foundation tests with current API (30 tests)
- Phase 2: MQTT v5 feature tests (40 tests)
- Phase 3-4: Raw packet malformed tests (40 tests)
- Enhanced event handler properties (subscription IDs, MQTT v5 properties)
- Client support MQTT v3
- UnixDomain socket
- QUIC support (multi stream)
- FFI/language wrappers for QUIC source bind/rebind and local-address-change notification
- Service discovery for distributed deployments
- WebSocket transport support
- Packet inspection utilities
- Multi-broker failover
- Message persistence
- Metrics and observability
This document tracks the tasks for improving the flowsdk project.
Messages can be communicated within processes, between processes, over LAN, and across wide area networks. It supports client-server req/resp, pub/sub mode, or point-to-point mode. The network transport layer supports traditional TCP-based or UDP protocols, as well as security-focused TCP/TLS, and even the latest QUIC protocol.
- Improve error handling by replacing
unwrap()with proper error handling and using?to propagate errors. - Add configuration options for the broker and gRPC server addresses.
- Improve logging by replacing
println!with a logging framework liketracing. - Refactor duplicated code between
client.rsands-client.rs.
- Implement connection state cleanup to prevent memory leaks.
- Implement bidirectional message flow using server-streaming gRPC for subscriptions.
- Add authentication to the gRPC server.
- Add input validation to the gRPC server.
- Fix the infinite
loop {}in spawned tasks inrun_proxyto allow proper task termination and resource release. - Implement full MQTT proxy logic to handle all MQTT control packets (PUBLISH, SUBSCRIBE, PINGREQ, DISCONNECT, etc.) beyond CONNECT/CONNACK.
- Utilize the
mpsc::Senderand implement the correspondingReceiverto handle incoming messages from the gRPC server (e.g., PUBLISH messages). - Improve error handling in
r-proxy.rsto provide more specific error types and context for easier debugging. - Replace
eprintln!with structured logging (e.g.,tracing) for better observability in production environments. - Implement robust connection state management to ensure proper handling of client connections throughout their lifecycle.
- Should use gRPC stream mode
Analysis of MQTT 5.0 specification Appendix B reveals the following missing mandatory validations:
- Property Value Ranges: Validate that
ReceiveMaximum> 0 [MQTT-3.1.2-18] - Property Value Ranges: Validate that boolean properties (Request Problem Information, Request Response Information, etc.) are only 0 or 1 [MQTT-3.1.2-14]
- Duplicate Properties: Detect and reject duplicate properties in property sets [MQTT-2.2.2-2]
- MaximumPacketSize: Enforce
MaximumPacketSizelimits during packet parsing/encoding [MQTT-3.1.2-24] - Property Context Validation: Validate property usage context (e.g., Will properties only when Will Flag set) [MQTT-3.1.2-11]
- Will Topic Validation: Validate Will Topic syntax when Will Flag is set [MQTT-3.1.2-9]
- Session Expiry: Validate Session Expiry Interval behavior and limits [MQTT-3.1.2-23]
- Server Keep Alive: Implement Server Keep Alive override validation [MQTT-3.1.4-13]
- Client ID Characters: Validate Client ID contains only recommended characters (SHOULD requirement) [MQTT-3.1.3-5]
- Property value range validation should be added to
PropertyType::decode()methods - Duplicate property detection requires tracking during property parsing
- MaximumPacketSize enforcement needs integration with buffer size management
- Boolean property validation can be added as feature-gated checks in property decoding
- Property context validation requires cross-referencing with packet flags during validation
- Implement MQTT topic matching with wildcards (+ and #) for message routing in the server session.