All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
size()
method onPacket
calculates size once serialized.read()
andwrite()
methods onPacket
.ConnectionAborted
variant onStateError
type to denote abrupt end to a connectionset_session_expiry_interval
andsession_expiry_interval
methods onMqttOptions
.Auth
packet as per MQTT5 standards- Allow configuring the
nodelay
property of underlying TCP client with thetcp_nodelay
field inNetworkOptions
- rename
N
asAsyncReadWrite
to describe usage. - use
Framed
to encode/decode MQTT packets. - use
Login
to store credentials - Made
DisconnectProperties
struct public. - Replace
Vec<Option<u16>>
withFixedBitSet
for managing packet ids of released QoS 2 publishes and incoming QoS 2 publishes inMqttState
. - Accept
native_tls::TlsConnector
as input forTransport::tls_with_config
.
- Validate filters while creating subscription requests.
- Make v4::Connect::write return correct value
- Ordering of
State.events
related toQoS > 0
publishes - Filter PUBACK in pending save requests to fix unexpected PUBACK sent to reconnected broker.
- Resume session only if broker sends
CONNACK
withsession_present == 1
. - Remove v5 PubAck/PubRec/PubRel/PubComp/Sub/Unsub failures from
StateError
and log warnings on these failures.
- Expose
EventLoop::clean
to 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 inDER
andSEC1
encoding. Previously onlyPKCS#1
andPKCS#8
where supported. - TLS Error variants:
NoValidClientCertInChain
,NoValidKeyInChain
. - Drain
Request
s, 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_senders
method to theClient
asfrom_sender
MqttOptions::new
now accepts empty client id.MqttOptions::set_clean_session
now panics if client ID is empty andclean_session
flag is set to false.- Synchronous client methods take
&self
instead of&mut self
(#646) - Removed the
Key
enum: users do not need to specify the TLS key variant in theTlsConfiguration
anymore, 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
&password
fields are replaced byclient_auth
. - Make v5
RetainForwardRule
public, in order to allow setting it when constructingFilter
values. - Use
VecDeque
instead ofIntoIter
to fix unintentional drop of pending requests onEventLoop::clean
(#780) StateError::IncommingPacketTooLarge
is nowStateError::IncomingPacketTooLarge
.- Update
tokio-rustls
to0.25.0
,rustls-native-certs
to0.7.0
,rustls-webpki
to0.102.1
,rusttls-pemfile
to2.0.0
,async-tungstenite
to0.24.0
,ws_stream_tungstenite
to0.12.0
andhttp
to1.0.0
. This is a breaking change as types from some of these crates are part of the public API.
- Lowered the MSRV to 1.64.0
- Request modifier function should be Send and Sync and removed unnecessary Box
- Added
bind_device
toNetworkOptions
to enableTCPSocket.bind_device()
- Added
MqttOptions::set_request_modifier
for 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
tungstenite
dependency.
- Added
outgoing_inflight_upper_limit
to MQTT5MqttOptions
. This sets the upper bound for the number of outgoing publish messages (#615) - Added support for HTTP(s) proxy (#608)
- Added
proxy
feature gate - Refactored
eventloop::network_connect
to allow setting proxy - Added proxy options to
MqttOptions
- Added
- Update
rustls
to0.21
andtokio-rustls
to0.24
(#606)- Adds support for TLS certificates containing IP addresses
- Adds support for RFC8446 C.4 client tracking prevention
MqttState::new
takesmax_outgoing_packet_size
which was set inMqttOptions
but not used (#622)
- Enforce
max_outgoing_packet_size
on v4 client (#622)
- 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_props
etc - Refactored
MqttOptions
to useConnectProperties
for some fields - Other minor changes for MQTT5
- Remove
Box
onEvent::Incoming
- Removed dependency on pollster
- Fixed v5::mqttbytes
Connect
packet returning wrong size onwrite()
- Added tests for packet length for all v5 packets
NetworkOptions
added to provide a way to configure low level network configurations (#545)
options
inEventloop
now is calledmqtt_options
(#545)ConnectionError
now has specific variant for type ofTimeout
,FlushTimeout
andNetworkTimeout
instead of genericTimeout
for both (#545)conn_timeout
is moved intoNetworkOptions
(#545)
Old changelog entries can be found at CHANGELOG.md