Rumqtt v0.25.0 Release Notes
We're excited to announce the release of Rumqtt 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_interval
in MQTT v5 connections, giving you better control over session persistence - Authentication Packets: Implemented MQTT v5
Auth
packet support for enhanced authentication flows - Connection Properties: Made
DisconnectProperties
struct public for better disconnect handling - Session Resumption: Improved session resume logic to only activate when CONNACK indicates session is present
Security & Performance Improvements
- Constant-Time Password Comparison: Enhanced security by implementing constant-time password comparison in rumqttd to prevent timing attacks
- 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::MAX
instead of zero for better connection handling
Developer Experience Enhancements
- TLS Support: Added native TLS
TlsConnector
support for more flexible secure connections - Client Configuration: New
set_client_id
method in MqttOptions for easier client ID management - Public APIs: Made Server public in rumqttd and exposed v5::Connection return types
- 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_many
always caused EmptySubscription errors - Unsubscribe Support: Added
LinkTx::unsubscribe
functionality
Packet Processing
- Write Operations: Ensured all
write
operations 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
Network
implementation withFramed<.., Codec>
- Improved credential storage using
Login
in 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
- @Inventor77 - Implemented secure password comparison
- @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
- @Ichmed - Made Server public in rumqttd
- @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 RumQTT 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.toml
to 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! 🦀