rumqttc-0.25.0
rumqttc v0.25.0 Release Notes
We're excited to announce the release of rumqttc v0.25.0! This release brings significant improvements, new features, and important bug fixes that enhance the stability and functionality of your MQTT applications.
🚀 What's New
Enhanced MQTT v5 Support
- Session Management: Added support for
session_expiry_intervalin MQTT v5 connections, giving you better control over session persistence - Authentication Packets: Implemented MQTT v5
Authpacket support for enhanced authentication flows - Connection Properties: Made
DisconnectPropertiesstruct public for better disconnect handling
Security & Performance Improvements
- Network Performance: Added TCP no_delay configuration option for reduced latency in time-sensitive applications
- Memory Optimization: Replaced Vec with FixedBitSet for QoS 2 packet tracking, reducing memory overhead
- Network Timeout: Set default network timeout to
Duration::MAXinstead of zero for better connection handling
Developer Experience Enhancements
- TLS Support: Added native TLS
TlsConnectorsupport for more flexible secure connections - Client Configuration: New
set_client_idmethod in MqttOptions for easier client ID management - External Auth: Re-enabled public access to external authentication features
🔧 Important Bug Fixes
Connection Stability
- Fixed panic issues on connection closure
- Resolved MQTT v5 packet writing problems that prevented outgoing packets from reaching the network
- Improved event ordering in
poll()method for more predictable behavior
Subscription Handling
- Filter Validation: Added proper validation for subscription filters
- Subscribe Many Fix: Resolved critical issue where
subscribe_manyalways caused EmptySubscription errors
Packet Processing
- Write Operations: Ensured all
writeoperations return correct byte counts - PubAck Filtering: Fixed filtering of unexpected PubAck packets in event loop
- Error Handling: Removed SubAck/UnsubAck/PubAck/PubRec/PubRel/PubComp reason code errors from critical state errors
📚 Code Quality & Maintenance
Dependency Updates
We've updated several critical dependencies for security and performance:
- OpenSSL: 0.10.64 → 0.10.71
- H2: 0.4.2 → 0.4.4
- Rustls: 0.22.2 → 0.22.4
- Various Go dependencies in benchmarks
Refactoring Highlights
- Simplified
Networkimplementation withFramed<.., Codec> - Improved credential storage using
Loginin MqttOptions - Enhanced unsolicited publish handling
- Better clippy compliance and code quality
🎯 Breaking Changes
While we've maintained backward compatibility where possible, please note:
- Some internal APIs have been refactored for better performance
- Error handling has been improved, which may affect error matching in your code
- Default network timeout behavior has changed
🤝 Community Contributions
A huge thank you to our 16 new contributors who made this release possible! We're thrilled to welcome these developers to the rumqtt community:
New Contributors:
- @amokfa - Fixed write operation byte counting
- @pranavgoel29 - Added subscription filter validation
- @xiaocq2001 - Added MQTT v5 session expiry and session resume improvements
- @wangwen-4220 - Fixed PubAck filtering in event loop
- @hippalus - Optimized QoS 2 packet tracking with FixedBitSet
- @FedorSmirnov89 - Added TCP no_delay configuration option
- @silvestrpredko - Re-enabled external auth public availability
- @FSMaxB - Fixed critical subscribe_many functionality
- @J-Kappes - Improved TLS documentation
- @CosminPerRam - Fixed EventLoop documentation spelling
- @Ddystopia - Fixed default network timeout behavior
- @edgale - Fixed function description typos
- @elrafoon - Added MqttOptions set_client_id method
- @jbeyerstedt - Made v5::Connection return types public
This diverse group of contributors brought improvements ranging from security enhancements and performance optimizations to API improvements and documentation fixes. Their combined efforts have made rumqttc more robust, secure, and user-friendly.
Special recognition goes to contributors who tackled complex issues like MQTT v5 protocol implementation, security vulnerabilities, and critical subscription handling bugs.
🔄 Migration Guide
For most users, upgrading should be straightforward:
- Update your dependency: Change your
Cargo.tomlto userumqttc = "0.25.0" - Review timeout handling: If you rely on specific timeout behavior, review the new default timeout settings
- Check error handling: Update any code that specifically catches the removed reason code errors
- Test MQTT v5 features: If using MQTT v5, test the improved session handling and auth features
🔗 Resources
- Full Changelog: View on
- Documentation: Check our updated docs for new features and API changes
- Issues: Report bugs or request features on our GitHub repository
This release represents months of community effort and testing. We're confident it will provide a more stable, secure, and feature-rich MQTT experience for your applications.
Happy coding! 🦀