rumqttc-0.25.1
This patch release focuses on fixing the broken WebSocket feature and includes dependency updates.
WebSocket Fix: This release resolves a build issue that occurred when the websocket feature was enabled, caused by incompatibility with ws_stream_tungstenite v0.14.0. The dependency has been updated to v0.15.0, restoring full WebSocket functionality.
- Fixed: Build failure when compiling with the
websocketfeature enabled (#999) - Added: New
use-rustls-no-providerfeature for more flexible TLS configuration (#988) - Maintenance: Updated dependencies (#1006 )
Welcome to our new contributors:
Full Changelog: [rumqttc-0.25.0...rumqttc-0.25.1]
rumqttd-0.20.0
- Async Authentication: Added support for async auth functions for more flexible authentication flows
- Enhanced Security:
- Implemented constant-time password comparison to prevent timing attacks
- Added SEC1 key support with improved certificate handling
- Public API Improvements: Made
Server,Forward, andexternal_authpublicly available for better extensibility
- Fixed session present flag in CONNACK packets
- Corrected keepalive duration handling when reading from network
- Fixed event ordering returned on
poll() - Set default network timeout to
Duration::MAXinstead of zero - Improved error handling for MQTT acknowledgment packets
- Updated rustls and dependencies
- Added
LinkTx::unsubscribefunctionality - Enhanced logging for peer-initiated disconnects
- Improved client_id recording in tracing spans
- Disabled default feature for
metrics-exporter-prometheus
Welcome to @amokfa, @Inventor77, @xiaocq2001, @silvestrpredko, @Ddystopia, and @Ichmed! 🎉
Full Changelog: https://github.com/bytebeamio/rumqtt/compare/rumqttd-0.19.0...rumqttd-0.20.0
rumqttc-0.25.0
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.
- 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
- 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
- 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
- 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
- Filter Validation: Added proper validation for subscription filters
- Subscribe Many Fix: Resolved critical issue where
subscribe_manyalways caused EmptySubscription errors
- 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
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
- Simplified
Networkimplementation withFramed<.., Codec> - Improved credential storage using
Loginin MqttOptions - Enhanced unsolicited publish handling
- Better clippy compliance and code quality
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
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.
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
- 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! 🦀
rumqttc-0.24.0
- 🧾 Expose
EventLoop::cleanto allow triggering shutdown and subsequent storage of pending requests by @de-sh in https://github.com/bytebeamio/rumqtt/pull/741
You can now shutdown the Eventloop and drain Requests, which weren't received from the channel and keep them in pending while doing cleanup to prevent any data loss. Example usage in bytebeamio/uplink.
- 🔐 Support for all TLS key formats currently supported by Rustls:
PKCS#1,PKCS#8,RFC5915and new TLS Error variants:NoValidClientCertInChain,NoValidKeyInChainby @ijager in https://github.com/bytebeamio/rumqtt/pull/752 and https://github.com/bytebeamio/rumqtt/pull/752
With this, we now practically support all RSA and ECC keys in DER/SEC1 encoding.
-
A websocket request modifier for v4 client by @swanandx in https://github.com/bytebeamio/rumqtt/pull/772
-
Surfaced
AsyncClient'sfrom_sendersmethod to theClientasfrom_senderby @BKDaugherty in https://github.com/bytebeamio/rumqtt/pull/779
- 🆔 Allow empty Client ID by @arunanshub in https://github.com/bytebeamio/rumqtt/pull/791
MqttOptions::new now accepts empty client_id and MqttOptions::set_clean_session panics if client_id is empty and clean_session flag is set to false.
-
Synchronous client methods take
&selfinstead of&mut selfby @BKDaugherty in https://github.com/bytebeamio/rumqtt/pull/646 -
Removed the
Keyenum by @ijager in https://github.com/bytebeamio/rumqtt/pull/752
Users do not need to specify the TLS key variant in the TlsConfiguration anymore, this is inferred automatically. To update your code simply remove Key::ECC() or Key::RSA() from the initialization.
- Certificate for client authentication is optional in native-tls variant by @swanandx in https://github.com/bytebeamio/rumqtt/pull/758
With this, the der & password fields are replaced by client_auth.
-
Make v5
RetainForwardRulepublic, in order to allow setting it when constructingFiltervalues by @brianmay in https://github.com/bytebeamio/rumqtt/pull/767 -
Use
VecDequeinstead ofIntoIterto fix unintentional drop of pending requests onEventLoop::cleanby @de-sh in https://github.com/bytebeamio/rumqtt/pull/780 -
Fix typo -
StateError::IncommingPacketTooLarge=>StateError::IncomingPacketTooLargeby @swanandx in https://github.com/bytebeamio/rumqtt/pull/786 -
Update rustls and friends by @qwandor in https://github.com/bytebeamio/rumqtt/pull/790
Update tokio-rustls to 0.25.0, rustls-native-certs to 0.7.0, rustls-webpki to 0.102.1, rusttls-pemfile to 2.0.0, async-tungstenite to 0.24.0, ws_stream_tungstenite to 0.12.0 and http to 1.0.0. This is a breaking change as types from some of these crates are part of the public API in
- Lowered the MSRV to 1.64.0 by @RoastVeg in https://github.com/bytebeamio/rumqtt/pull/762
- Request modifier function should be Send and Sync and removed unnecessary Box by @swanandx in https://github.com/bytebeamio/rumqtt/pull/770
- @BKDaugherty made their first contribution in #646
- @RoastVeg made their first contribution in #762
- @ijager made their first contribution in #752
Full Changelog: https://github.com/bytebeamio/rumqtt/compare/rumqttd-0.19.0...rumqttc-0.24.0
rumqttd-0.19.0
- 🔐 Extensible external authentication by @nathansizemore in https://github.com/bytebeamio/rumqtt/pull/761
You can hook custom function for authentication using client id, username and password. This custom function can be extended as per need, for e.g. fetching credentials from DB, using tokens or spawning processes, etc. see example for setup.
- 🔑 Add support for ECC keys when configuring TLS in rumqttd by @AlexandreCassagne in https://github.com/bytebeamio/rumqtt/pull/743
Previously only RSA keys were accepted, but now you can specify any TLS key formats currently supported by rustls, like ECC, PKCS8 to name a few.
- v4 config is optional by @swanandx in https://github.com/bytebeamio/rumqtt/pull/736
user can specify v4 and/or v5 config. Specifying [v4.x] in rumqttd.toml is no longer mandatory, those who wish to only use v5 can now only include [v5.x] in config.
- console configuration is optional by @swanandx in https://github.com/bytebeamio/rumqtt/pull/737
specifying [console] in rumqttd.toml is now optional and can be safely removed if you don't wish to use console.
- CA certificate is optional if client auth is disabled
capath in tls config is only required is client authentication will be used ( see "verify-client-cert" feature below to know more ). Warning will be logged if the feature is disabled and capath is being ignored.
- websocket feature is enabled by default by @swanandx in https://github.com/bytebeamio/rumqtt/pull/734
rumqttd will log a warning if [ws.x] is specified in config but getting ignored due to websocket feature is disabled.
-
"websockets" feature is removed in favour of "websocket"
-
client auth is featured gated behind "verify-client-cert" by @de-sh in https://github.com/bytebeamio/rumqtt/pull/756
mutual TLS ( mTLS ) or client authentication, which is done verifying by certificates provided client is now optional with use-rustls. capath specifying CA certificate must be present in config file if client auth is enabled. To enable client auth, you need to enable verify-client-cert features ( disabled by default to match behavior of use-native-tls )
- Console endpoint
/configprints Router Config instead of returning console settings by @swanandx in https://github.com/bytebeamio/rumqtt/pull/727 - Update tungstenite and dependencies to fix CVE by @swanandx in https://github.com/bytebeamio/rumqtt/pull/730
Maintainance
-
build(deps): bump webpki from 0.22.1 to 0.22.2 by @dependabot in https://github.com/bytebeamio/rumqtt/pull/720
-
build(deps): bump rustix from 0.38.17 to 0.38.19 by @dependabot in https://github.com/bytebeamio/rumqtt/pull/735
-
update tungstenite and other dependencies by @swanandx in https://github.com/bytebeamio/rumqtt/pull/730
-
build(deps): bump openssl from 0.10.57 to 0.10.60 by @dependabot in https://github.com/bytebeamio/rumqtt/pull/759
-
fix: clippy lints by @swanandx in https://github.com/bytebeamio/rumqtt/pull/725
-
feat: install cross from git and cleanup by @swanandx in https://github.com/bytebeamio/rumqtt/pull/716
-
chore: move rust-version from workspace to respective crates by @swanandx in https://github.com/bytebeamio/rumqtt/pull/763
-
fix rust-cache with proper key and global RUSTFLAG by @swanandx in https://github.com/bytebeamio/rumqtt/pull/764
- @AlexandreCassagne made their first contribution in https://github.com/bytebeamio/rumqtt/pull/743
- @nathansizemore made their first contribution in https://github.com/bytebeamio/rumqtt/pull/761
Full Changelog: https://github.com/bytebeamio/rumqtt/compare/rumqttd-0.18.0...rumqttd-0.19.0
rumqttc 0.23.0
- Added
bind_devicetoNetworkOptionsto enableTCPSocket.bind_device() - Added
MqttOptions::set_request_modifierfor setting a handler for modifying a websocket request before sending it.
- Allow keep alive values <= 5 seconds (#643)
- Verify "mqtt" is present in websocket subprotocol header.
- Remove dependency on webpki. CVE
- Removed dependency vulnerability, see rustsec. Update of
tungstenitedependency.
- Replace heavy futures dep by @mattfbacon in https://github.com/bytebeamio/rumqtt/pull/645
- Allow modifying websocket requests. by @reitermarkus in https://github.com/bytebeamio/rumqtt/pull/642
- docs: remove invalid docs disclaimer by @carlocorradini in https://github.com/bytebeamio/rumqtt/pull/657
- Disable unsused features from
flumedependency by @domenicquirl in https://github.com/bytebeamio/rumqtt/pull/653 - build(deps): Bump dependencies to latest by @Dirreke in https://github.com/bytebeamio/rumqtt/pull/666
- rumqttc: Add bind_device to NetworkOptions to enable TCPSocket.bind_device() by @seimonw in https://github.com/bytebeamio/rumqtt/pull/654
- fix(Event Loop): Allow keep-alives <= 5 secs by @danieldougherty in https://github.com/bytebeamio/rumqtt/pull/655
- feat(rumqttc): Replace multi line debug log with single line by @flxo in https://github.com/bytebeamio/rumqtt/pull/688
- build(deps): bump rustls-webpki from 0.101.1 to 0.101.4 by @dependabot in https://github.com/bytebeamio/rumqtt/pull/687
- build(deps): update dependencies by @swanandx in https://github.com/bytebeamio/rumqtt/pull/690
- use patched
ws_stream_tungsteniteto removewebpkiby @swanandx in https://github.com/bytebeamio/rumqtt/pull/704 - chore: cargo update and replace deprecated functions by @swanandx in https://github.com/bytebeamio/rumqtt/pull/710
- Call the bind_device function only if the bind_device network option … by @frank-hivewatch in https://github.com/bytebeamio/rumqtt/pull/713
- fix: validate subprotocol mqtt by @Vilayat-Ali in https://github.com/bytebeamio/rumqtt/pull/724
- fix: clippy lints by @swanandx in https://github.com/bytebeamio/rumqtt/pull/725
- Validate "mqtt" exists in comma delimited subprotocol header by @swanandx in https://github.com/bytebeamio/rumqtt/pull/726
- revert #726: only expect "mqtt" in response header by @de-sh in https://github.com/bytebeamio/rumqtt/pull/729
- update tungstenite dependencies for security purpose by @Arend-Jan in https://github.com/bytebeamio/rumqtt/pull/728
- @mattfbacon made their first contribution in https://github.com/bytebeamio/rumqtt/pull/645
- @reitermarkus made their first contribution in https://github.com/bytebeamio/rumqtt/pull/642
- @domenicquirl made their first contribution in https://github.com/bytebeamio/rumqtt/pull/653
- @Dirreke made their first contribution in https://github.com/bytebeamio/rumqtt/pull/666
- @seimonw made their first contribution in https://github.com/bytebeamio/rumqtt/pull/654
- @danieldougherty made their first contribution in https://github.com/bytebeamio/rumqtt/pull/655
- @frank-hivewatch made their first contribution in https://github.com/bytebeamio/rumqtt/pull/713
- @Vilayat-Ali made their first contribution in https://github.com/bytebeamio/rumqtt/pull/724
- @Arend-Jan made their first contribution in https://github.com/bytebeamio/rumqtt/pull/728
rumqttd 0.18.0
This release fixes retained and will messages and adds support for will delay interval in MQTTv5. Rumqttd now have an enhanced release profile in Cargo.toml which would improve performance while reducing the binary size! Here are some of the other changes:
- Will Delay Interval for MQTTv5 by @swanandx in https://github.com/bytebeamio/rumqtt/pull/686
- Non-consuming builder pattern for constructing Connection by @swanandx in https://github.com/bytebeamio/rumqtt/pull/708
- Removed Link and its implementation which were deprecated by @swanandx in https://github.com/bytebeamio/rumqtt/pull/684
- Will messages by @swanandx in https://github.com/bytebeamio/rumqtt/pull/686
- Retained Messages by @swanandx in https://github.com/bytebeamio/rumqtt/pull/683
- Publish properties in qos2 publishes by @swanandx in https://github.com/bytebeamio/rumqtt/pull/702
- Remove dependency on webpki to fix CVE
- enhance cargo workspace and release build by @carlocorradini in https://github.com/bytebeamio/rumqtt/pull/680
- configure cross to support x86_64 and aarch64 for linux/musl by @carlocorradini in https://github.com/bytebeamio/rumqtt/pull/674
- etc.
Full Changelog: https://github.com/bytebeamio/rumqtt/compare/rumqttd-0.17.0...rumqttd-0.18.0
rumqttd-0.17.0
- 🆔 Subscription IDs support in broker by @swanandx in https://github.com/bytebeamio/rumqtt/pull/632
- 🔥 Shared subscriptions with configurable strategy by @Nickztar in https://github.com/bytebeamio/rumqtt/pull/668
We can configure strategy for shared subscriptions using rumqttd.toml The available strategies are as follows: round_robin (Default): select clients in turns as per the order of their subscription. random: randomly choose a client and sent it. ( note: once a client is chosen, we try to send as many msg as we can ) sticky: stick to a subscriber and keep sending it all the messages until its gone.
- build(deps): Bump dependencies to latest by @Dirreke in https://github.com/bytebeamio/rumqtt/pull/666
- chore(github): removed stale by @carlocorradini in https://github.com/bytebeamio/rumqtt/pull/675
- chore(mqttverifier): fix typo and better structure with jsdoc type by @carlocorradini in https://github.com/bytebeamio/rumqtt/pull/679
- docs: add AUR package in README.md by @neruyzo in https://github.com/bytebeamio/rumqtt/pull/681
- @Dirreke made their first contribution in https://github.com/bytebeamio/rumqtt/pull/666
- @neruyzo made their first contribution in https://github.com/bytebeamio/rumqtt/pull/681
Full Changelog: https://github.com/bytebeamio/rumqtt/compare/rumqttd-0.16.0...rumqttd-0.17.0
rumqttd 0.16.0
Blog Post discussing this release - https://bytebeam.io/blog/qos2-and-websockets-support-rumqttd/
- QoS2 support (#604) 🚀
- Support for Websocket connections (#633) 🕸️
- Ability to configure segment size individually (#602)
- LinkBuilder for constructing LinkRx/LinkTx (#659)
- Link and its implementation, use LinkBuilder instead
- Include reason code for UnsubAck in v5
- @Nickztar made their first contribution in https://github.com/bytebeamio/rumqtt/pull/633
- @anirudhRowjee made their first contribution in https://github.com/bytebeamio/rumqtt/pull/635
rumqttc 0.22.0
- Added
outgoing_inflight_upper_limitto MQTT5MqttOptions. This sets the upper bound for the number of outgoing publish messages (#615) - Added support for HTTP(s) proxy (#608)
- Added
proxyfeature gate - Refactored
eventloop::network_connectto allow setting proxy - Added proxy options to
MqttOptions
- Added
- Update
rustlsto0.21andtokio-rustlsto0.24(#606)- Adds support for TLS certificates containing IP addresses
- Adds support for RFC8446 C.4 client tracking prevention
MqttState::newtakesmax_outgoing_packet_sizewhich was set inMqttOptionsbut not used (#622)