rumqttc
An efficient and robust mqtt client for your connected devices
0.25.1
7.6M downloads/mo
#3602 most downloaded on crates.io
bytebeamio/rumqtt
What this package is like to depend on
Last release 9 months ago
21 Nov 2025
Ships unpredictably
gaps range from 2 weeks to 1.5 years
Most releases are documented
notes for 25 of 35 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
35 releases · first in 2020
2 releases in the last 12 months
see the full history below
Release timeline
35 releases · Jun 2020 to Nov 2025Releases
latest 35-
0.25.121 Nov 2025Release notes
Open source →rumqttc v0.25.1
This patch release focuses on fixing the broken WebSocket feature and includes dependency updates.
Highlights
WebSocket Fix: This release resolves a build issue that occurred when the
websocketfeature was enabled, caused by incompatibility withws_stream_tungstenite v0.14.0. The dependency has been updated tov0.15.0, restoring full WebSocket functionality.Changes
- 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 )
Contributors
Welcome to our new contributors:
Full Changelog: [rumqttc-0.25.0...rumqttc-0.25.1]
Release notes
Open source →Added
use-rustls-no-providerfeature flag to allow choosing crypto backend without being forced to compileaws_lc_rs
Changed
Deprecated
Removed
Fixed
- Fixed broken websocket feature in rumqttc-0.25.0
Security
- Fixed: Build failure when compiling with the
-
0.25.009 Sep 2025Release notes
Open source →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! 🦀
Release notes
Open source →Added
size()method onPacketcalculates size once serialized.read()andwrite()methods onPacket.ConnectionAbortedvariant onStateErrortype to denote abrupt end to a connectionset_session_expiry_intervalandsession_expiry_intervalmethods onMqttOptions.Authpacket as per MQTT5 standards- Allow configuring the
nodelayproperty of underlying TCP client with thetcp_nodelayfield inNetworkOptions set_client_idmethod onMqttOptions
Changed
- rename
NasAsyncReadWriteto describe usage. - use
Framedto encode/decode MQTT packets. - use
Loginto store credentials - Made
DisconnectPropertiesstruct public. - Replace
Vec<Option<u16>>withFixedBitSetfor managing packet ids of released QoS 2 publishes and incoming QoS 2 publishes inMqttState. - Accept
native_tls::TlsConnectoras input forTransport::tls_with_config. - Update
thiserrorto2.0.8,tokio-rustlsto0.26.0,rustls-webpkito0.102.8,rustls-pemfileto2.2.0,rustls-native-certsto0.8.1,async-tungsteniteto0.28.0,ws_stream_tungsteniteto0.14.0,native-tlsto0.2.12andtokio-streamto0.1.16. - Make error types returned by
rumqttc::v5::Connectionpublic
Deprecated
Removed
Fixed
- Validate filters while creating subscription requests.
- Make v4::Connect::write return correct value
- Ordering of
State.eventsrelated toQoS > 0publishes - Filter PUBACK in pending save requests to fix unexpected PUBACK sent to reconnected broker.
- Resume session only if broker sends
CONNACKwithsession_present == 1. - Remove v5 PubAck/PubRec/PubRel/PubComp/Sub/Unsub failures from
StateErrorand log warnings on these failures.
Security
- Session Management: Added support for
-
0.24.027 Feb 2024Release notes
Open source →What's New?
- 🧾 Expose
EventLoop::cleanto allow triggering shutdown and subsequent storage of pending requests by @de-sh in #741
You can now shutdown the
Eventloopand drainRequests, 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 #752 and #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 #772
-
Surfaced
AsyncClient'sfrom_sendersmethod to theClientasfrom_senderby @BKDaugherty in #779
Changes
- 🆔 Allow empty Client ID by @arunanshub in #791
MqttOptions::newnow accepts emptyclient_idandMqttOptions::set_clean_sessionpanics ifclient_idis empty andclean_sessionflag is set tofalse.-
Synchronous client methods take
&selfinstead of&mut selfby @BKDaugherty in #646
Users do not need to specify the TLS key variant in the
TlsConfigurationanymore, this is inferred automatically. To update your code simply removeKey::ECC()orKey::RSA()from the initialization.With this, the
der&passwordfields are replaced byclient_auth.-
Make v5
RetainForwardRulepublic, in order to allow setting it when constructingFiltervalues by @brianmay in #767 -
Use
VecDequeinstead ofIntoIterto fix unintentional drop of pending requests onEventLoop::cleanby @de-sh in #780 -
Fix typo -
StateError::IncommingPacketTooLarge=>StateError::IncomingPacketTooLargeby @swanandx in #786
Update
tokio-rustlsto0.25.0,rustls-native-certsto0.7.0,rustls-webpkito0.102.1,rusttls-pemfileto2.0.0,async-tungsteniteto0.24.0,ws_stream_tungsteniteto0.12.0andhttpto1.0.0. This is a breaking change as types from some of these crates are part of the public API inFixes
- Lowered the MSRV to 1.64.0 by @RoastVeg in #762
- Request modifier function should be Send and Sync and removed unnecessary Box by @swanandx in #770
New Contributors 🎉
- @BKDaugherty made their first contribution in #646
- @RoastVeg made their first contribution in #762
- @ijager made their first contribution in #752
Full Changelog: rumqttd-0.19.0...rumqttc-0.24.0
Release notes
Open source →Added
- Expose
EventLoop::cleanto allow triggering shutdown and subsequent storage of pending requests - Support for all variants of TLS key formats currently supported by Rustls:
PKCS#1,PKCS#8,RFC5915. In practice we should now support all RSA keys and ECC keys inDERandSEC1encoding. Previously onlyPKCS#1andPKCS#8where supported. - TLS Error variants:
NoValidClientCertInChain,NoValidKeyInChain. - Drain
Requests, which weren't received by eventloop, from channel and put them in pending while doing cleanup to prevent data loss. - websocket request modifier for v4 client
- Surfaced
AsyncClient'sfrom_sendersmethod to theClientasfrom_sender
Changed
MqttOptions::newnow accepts empty client id.MqttOptions::set_clean_sessionnow panics if client ID is empty andclean_sessionflag is set to false.- Synchronous client methods take
&selfinstead of&mut self(#646) - Removed the
Keyenum: users do not need to specify the TLS key variant in theTlsConfigurationanymore, this is inferred automatically. To update your code simply removeKey::ECC()orKey::RSA()from the initialization. - certificate for client authentication is now optional while using native-tls.
der&passwordfields are replaced byclient_auth. - Make v5
RetainForwardRulepublic, in order to allow setting it when constructingFiltervalues. - Use
VecDequeinstead ofIntoIterto fix unintentional drop of pending requests onEventLoop::clean(#780) StateError::IncommingPacketTooLargeis nowStateError::IncomingPacketTooLarge.- Update
tokio-rustlsto0.25.0,rustls-native-certsto0.7.0,rustls-webpkito0.102.1,rusttls-pemfileto2.0.0,async-tungsteniteto0.24.0,ws_stream_tungsteniteto0.12.0andhttpto1.0.0. This is a breaking change as types from some of these crates are part of the public API.
Deprecated
Removed
Fixed
- Lowered the MSRV to 1.64.0
- Request modifier function should be Send and Sync and removed unnecessary Box
Security
- 🧾 Expose
-
0.23.010 Oct 2023Release notes
Open source →Added
- Added
bind_devicetoNetworkOptionsto enableTCPSocket.bind_device() - Added
MqttOptions::set_request_modifierfor setting a handler for modifying a websocket request before sending it.
Fixed
- Allow keep alive values <= 5 seconds (#643)
- Verify "mqtt" is present in websocket subprotocol header.
Security
- Remove dependency on webpki. CVE
- Removed dependency vulnerability, see rustsec. Update of
tungstenitedependency.
Other Changes
- Replace heavy futures dep by @mattfbacon in #645
- Allow modifying websocket requests. by @reitermarkus in #642
- docs: remove invalid docs disclaimer by @carlocorradini in #657
- Disable unsused features from
flumedependency by @domenicquirl in #653 - build(deps): Bump dependencies to latest by @Dirreke in #666
- rumqttc: Add bind_device to NetworkOptions to enable TCPSocket.bind_device() by @seimonw in #654
- fix(Event Loop): Allow keep-alives <= 5 secs by @danieldougherty in #655
- feat(rumqttc): Replace multi line debug log with single line by @flxo in #688
- build(deps): bump rustls-webpki from 0.101.1 to 0.101.4 by @dependabot in #687
- build(deps): update dependencies by @swanandx in #690
- use patched
ws_stream_tungsteniteto removewebpkiby @swanandx in #704 - chore: cargo update and replace deprecated functions by @swanandx in #710
- Call the bind_device function only if the bind_device network option … by @frank-hivewatch in #713
- fix: validate subprotocol mqtt by @Vilayat-Ali in #724
- fix: clippy lints by @swanandx in #725
- Validate "mqtt" exists in comma delimited subprotocol header by @swanandx in #726
- revert #726: only expect "mqtt" in response header by @de-sh in #729
- update tungstenite dependencies for security purpose by @Arend-Jan in #728
New Contributors 🎉
- @mattfbacon made their first contribution in #645
- @reitermarkus made their first contribution in #642
- @domenicquirl made their first contribution in #653
- @Dirreke made their first contribution in #666
- @seimonw made their first contribution in #654
- @danieldougherty made their first contribution in #655
- @frank-hivewatch made their first contribution in #713
- @Vilayat-Ali made their first contribution in #724
- @Arend-Jan made their first contribution in #728
Release notes
Open source →Added
- Added
bind_devicetoNetworkOptionsto enableTCPSocket.bind_device() - Added
MqttOptions::set_request_modifierfor setting a handler for modifying a websocket request before sending it.
Changed
Deprecated
Removed
Fixed
- Allow keep alive values <= 5 seconds (#643)
- Verify "mqtt" is present in websocket subprotocol header.
Security
- Remove dependency on webpki. CVE
- Removed dependency vulnerability, see rustsec. Update of
tungstenitedependency.
- Added
-
0.22.007 Jun 2023Release notes
Open source →Added
- 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
Changed
MqttState::newtakesmax_outgoing_packet_sizewhich was set inMqttOptionsbut not used (#622)
Deprecated
Removed
Fixed
- Enforce
max_outgoing_packet_sizeon v4 client (#622)
Security
- Added
-
0.21.001 May 2023Release notes
Open source →Added
- Added support for MQTT5 features to v5 client
- Refactored v5::mqttbytes to use associated functions & include properties
- Added new API's on v5 client for properties, eg
publish_with_propsetc - Refactored
MqttOptionsto useConnectPropertiesfor some fields - Other minor changes for MQTT5
Changed
- Remove
BoxonEvent::Incoming
Deprecated
Removed
- Removed dependency on pollster
Fixed
- Fixed v5::mqttbytes
Connectpacket returning wrong size onwrite()- Added tests for packet length for all v5 packets
Security
- Added support for MQTT5 features to v5 client
-
0.20.017 Jan 2023Release notes
Open source →Added
NetworkOptionsadded to provide a way to configure low level network configurations (#545)
Changed
optionsinEventloopnow is calledmqtt_options(#545)ConnectionErrornow has specific variant for type ofTimeout,FlushTimeoutandNetworkTimeoutinstead of genericTimeoutfor both (#545)conn_timeoutis moved intoNetworkOptions(#545)
Old changelog entries can be found at CHANGELOG.md
-
0.19.028 Dec 2022Nothing published for this version
-
0.18.021 Nov 2022Release notes
Open source →What's Changed
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.tomlwhich would improve performance while reducing the binary size! Here are some of the other changes:⚡ Added
🚨 Changed
- Non-consuming builder pattern for constructing Connection by @swanandx in #708
- Removed Link and its implementation which were deprecated by @swanandx in #684
🛠️ Fixed
- Will messages by @swanandx in #686
- Retained Messages by @swanandx in #683
- Publish properties in qos2 publishes by @swanandx in #702
🔒 Security
- Remove dependency on webpki to fix CVE
🚧 Maintenance changes
- enhance cargo workspace and release build by @carlocorradini in #680
- configure cross to support x86_64 and aarch64 for linux/musl by @carlocorradini in #674
- etc.
Full Changelog: rumqttd-0.17.0...rumqttd-0.18.0
-
0.17.030 Sep 2022Nothing published for this version
-
0.16.009 Sep 2022Release notes
Open source →Blog Post discussing this release - https://bytebeam.io/blog/qos2-and-websockets-support-rumqttd/
Significant Changes
Changed
- Ability to configure segment size individually (#602)
- LinkBuilder for constructing LinkRx/LinkTx (#659)
Deprecated
- Link and its implementation, use LinkBuilder instead
Fixed
- Include reason code for UnsubAck in v5
New Contributors 🎉
- @Nickztar made their first contribution in #633
- @anirudhRowjee made their first contribution in #635
-
0.15.026 Aug 2022Nothing published for this version
-
0.14.012 Aug 2022Release notes
Open source →- Timeouts moved up to
connect()call (#408) - Tokio dependency
version = "1"(#412) - Fix empty property serialization (#413)
- Change variants in
ClientErrorto not expose dependence on flume/SendError(#420) - Revert erroring out when Subscription filter list is empty (#422)
- Remove the ability to cancel
EventLoop.poll()mid execution (#421) - Improve documentation and fix examples (#380, #401, #416, #417)
R13
- Timeouts moved up to
-
0.13.016 Jun 2022Release notes
Open source →- Add code in
rumqttc::v5, moving towards support for operating the client with MQTT 5 (#351, #393, #398) - Add missing
self.inflight += 1inMqttState.save_pubrel()(#389) - Error out when Subscription filter list is empty (#392)
- Make public
rumqttc::client::Iter(#402)
R12
- Add code in
-
0.12.021 Apr 2022Release notes
Open source →- Enable compilation without
rustlsas a dependency using--no-default-features(#365) - Rework variants of
ConnectionError(#370) - New constructor
MqttOptions::parse()usingurl(#379) - Use
get_mut()instead of index based access to ensure no panic (#384) - Better error messages (#385)
- Enable compilation without
-
0.11.003 Mar 2022Release notes
Open source →- Enable compilation without rustls as a dependency using
--no-default-features(#365) - Better error messages (#385)
R11
- Enable compilation without rustls as a dependency using
-
0.10.030 Oct 2021Release notes
Open source →tokio_rustlsupgraded to 0.23.2
NOTE: mqttbytes moved into separate repo, dependency on the same from rumqtt client and broker crates are hence forth removed.
R10
-
0.9.007 Oct 2021 -
0.8.009 Jun 2021 -
0.7.031 May 2021 -
0.6.014 May 2021 -
0.5.019 Jan 2021Release notes
Open source →- Make username and password public in connect packet
- Make protocol field in v5 public
-
0.4.006 Jan 2021 -
0.3.013 Dec 2020Release notes
Open source →- fix Connack and suback packet mixup during mqtt 5 implementation [breaking]
-
0.2.027 Oct 2020Release notes
Open source →- feature Complete mqtt 5 implementation
- fix Split mqtt 4 and 5 into modules [breaking]
-
0.1.212 Oct 2020Release notes
Open source →- Move integration tests outside eventloop
- Improve integration tests
- Fix panics by properly handling connection failure
-
0.1.130 Sep 2020Nothing published for this version
-
0.1.029 Sep 2020 -
0.0.711 Sep 2020Nothing published for this version
-
0.0.619 Aug 2020Release notes
Open source →- Manually setup 1 router thread and 1 io thread
- Add names to threads
- Compatibility with rumqttlog
-
0.0.526 Jul 2020Nothing published for this version
-
0.0.407 Jul 2020Nothing published for this version
-
0.0.321 Jun 2020Nothing published for this version
-
0.0.221 Jun 2020Nothing published for this version
-
0.0.121 Jun 2020Nothing published for this version