MQTTnet

MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.

MIT License

Stars
4.4K
Committers
124

Bot releases are visible (Hide)

MQTTnet - v3.0.0-rc2

Published by chkr1011 over 5 years ago

  • [Core] Added support for MQTTv5 packages.

  • [Core] Performance improvements.

  • [Core] Removed obsolete methods.

  • [Core] Fixed a memory leak when processing lots of messages (thanks to @tschanko)

  • [Core] Added more overloads for MQTT factory.

  • [Core] The client password is now hidden from the logs (replaced with **** if set).

  • [Core] Fixed a memory leak when using SSL connections (thanks to @biovoid).

  • [Client] Added validation of topics before publishing.

  • [Client] Added new MQTTv5 features to options builder.

  • [Client] Added uniform API across all supported MQTT versions (BREAKING CHANGE!)

  • [Client] The client will now avoid sending an ACK if an exception has been thrown in message handler (thanks to @ramonsmits).

  • [Client] Fixed issues in QoS 2 handling which leads to message loss.

  • [Client] Replaced all events with proper async compatible handlers (BREAKING CHANGE!).

  • [Client] Added more configuration values to TCP endpoint options.

  • [Client] Added used PacketIdentifier to publish result.

  • [ManagedClient] Replaced all events with proper async compatible handlers (BREAKING CHANGE!).

  • [ManagedClient] The log ID is now propagated to the internal client (thanks to @vbBerni).

  • [ManagedClient] Added validation of topics before publishing.

  • [ManagedClient] The internal MQTT client is now closed properly (thanks to @vbBerni).

  • [Server] Added support for MQTTv5 clients. The server will still return success for all cases at the moment even if more granular codes are available.

  • [Server] Fixed issues in QoS 2 handling which leads to message loss.

  • [Server] Replaced all events with proper async compatible handlers (BREAKING CHANGE!).

  • [Server] The used logger instance is now propagated to the WebSocket server adapter.

  • [Server] Added the flag "IsSecureConnection" which is set to true when the connection is encrypted.

  • [Server] Fixed wrong will message behavior when stopping server (thanks to @JohBa)

  • [Server] Added validation of topics before publishing.

  • [Server] Added more configuration values to TCP endpoint options.

  • [MQTTnet Server] Added as first Alpha version of standalone cross platform MQTT server.

  • [Note] Due to MQTTv5 a lot of new classes were introduced. This required adding new namespaces as well. Most classes are backward compatible but new namespaces must be added.

MQTTnet - v3.0.0-beta1

Published by chkr1011 over 5 years ago

  • [Core] Added support for MQTTv5 packages.

  • [Core] Performance improvements.

  • [Core] Removed obsolete methods.

  • [Core] Fixed a memory leak when processing lots of messages (thanks to @tschanko)

  • [Core] Added more overloads for MQTT factory.

  • [Core] The client password is now hidden from the logs (replaced with **** if set).

  • [Core] Fixed a memory leak when using SSL connections (thanks to @biovoid).

  • [Client] Added validation of topics before publishing.

  • [Client] Added new MQTTv5 features to options builder.

  • [Client] Added uniform API across all supported MQTT versions (BREAKING CHANGE!)

  • [Client] The client will now avoid sending an ACK if an exception has been thrown in message handler (thanks to @ramonsmits).

  • [Client] Fixed issues in QoS 2 handling which leads to message loss.

  • [Client] Replaced all events with proper async compatible handlers (BREAKING CHANGE!).

  • [Client] Added more configuration values to TCP endpoint options.

  • [ManagedClient] Replaced all events with proper async compatible handlers (BREAKING CHANGE!).

  • [ManagedClient] The log ID is now propagated to the internal client (thanks to @vbBerni).

  • [ManagedClient] Added validation of topics before publishing.

  • [ManagedClient] The internal MQTT client is now closed properly (thanks to @vbBerni).

  • [Server] Added support for MQTTv5 clients. The server will still return success for all cases at the moment even if more granular codes are available.

  • [Server] Fixed issues in QoS 2 handling which leads to message loss.

  • [Server] Replaced all events with proper async compatible handlers (BREAKING CHANGE!).

  • [Server] The used logger instance is now propagated to the WebSocket server adapter.

  • [Server] Added the flag "IsSecureConnection" which is set to true when the connection is encrypted.

  • [Server] Fixed wrong will message behavior when stopping server (thanks to @JohBa)

  • [Server] Added validation of topics before publishing.

  • [Server] Added more configuration values to TCP endpoint options.

  • [MQTTnet Server] Added as first Alpha version of standalone cross platform MQTT server.

  • [Note] Due to MQTTv5 a lot of new classes were introduced. This required adding new namespaces as well. Most classes are backward compatible but new namespaces must be added.

MQTTnet - v3.0.0-alpha3

Published by chkr1011 over 5 years ago

  • [Core] Added support for MQTTv5 packages.

  • [Core] Performance improvements (removed several exceptions).

  • [Core] Removed obsolete methods.

  • [Core] Fixed a memory leak when processing lots of messages (thanks to @tschanko)

  • [Core] Added more overloads for MQTT factory.

  • [Core] The client password is now hidden from the logs (replaced with **** if set).

  • [Client] Added validation of topics before publishing.

  • [Client] Added new MQTTv5 features to options builder.

  • [Client] Added uniform API across all supported MQTT versions (BREAKING CHANGE!)

  • [Client] The client will now avoid sending an ACK if an exception has been thrown in message handler (thanks to @ramonsmits).

  • [Client] Fixed issues in QoS 2 handling which leads to message loss.

  • [Client] Replaced all events with proper async compatible handlers (BREAKING CHANGE!).

  • [ManagedClient] Replaced all events with proper async compatible handlers (BREAKING CHANGE!).

  • [ManagedClient] The log ID is now propagated to the internal client (thanks to @vbBerni).

  • [ManagedClient] Added validation of topics before publishing.

  • [ManagedClient] The internal MQTT client is now closed properly (thanks to @vbBerni).

  • [Server] Added support for MQTTv5 clients. The server will still return success for all cases at the moment even if more granular codes are available.

  • [Server] Fixed issues in QoS 2 handling which leads to message loss.

  • [Server] Replaced all events with proper async compatible handlers (BREAKING CHANGE!).

  • [Server] The used logger instance is now propagated to the WebSocket server adapter.

  • [Server] Added the flag "IsSecureConnection" which is set to true when the connection is encrypted.

  • [Server] Fixed wrong will message behavior when stopping server (thanks to @JohBa)

  • [Server] Added validation of topics before publishing.

  • [MQTTnet Server] Added as first Alpha version of standalone cross platform MQTT server.

  • [Note] Due to MQTTv5 a lot of new classes were introduced. This required adding new namespaces as well. Most classes are backward compatible but new namespaces must be added.

MQTTnet - v3.0.0-alpha1

Published by chkr1011 almost 6 years ago

  • [Core] Added support for MQTTv5 packages.
  • [Client] Added new MQTTv5 features to options builder.
  • [Client] Added uniform API across all supported MQTT versions (BREAKING CHANGE!)
  • [Server] Added support for MQTTv5 clients. The server will still return success for all cases at the moment even if more granular codes are available.
  • [Note] Due to MQTTv5 a lot of new classes were introduced. This required adding new namespaces as well. Most classes are backward compatible but new namespaces must be added.
MQTTnet - v2.8.5

Published by chkr1011 almost 6 years ago

  • [Core] Updated nuget packages due to security issues.
  • [Client] Fixed wrong behavior of publish method when client is disconnecting (thanks to @PaulFake).
  • [Client] Added readonly property for accessing options.
  • [ManagedClient] Added max pending messages count option.
  • [ManagedClient] Add pending messages overflow strategy option.
  • [ManagedClient] Fixed an issue which deletes the wrong message from the internal queue (thanks to @PaulFake).
  • [ManagedClient] Added readonly property for accessing options.
  • [Server] Added new method which exposes all retained messages.
  • [Server] Removed (wrong) setter from the server options interface.
  • [Server] Fixed cpu spike in case a client disconnects (issue 421).
  • [Server] Fixed concurrent sends with Aspnetcore.Connections.Abstractions based transport.
  • [Server] Fixed wrong retain flag when distributing application messages (thanks to @trev0115).
  • [Server] Fixed issue which closes a connection when reconnecting with the same client ID (thanks to @fogzot).
MQTTnet - v2.8.4

Published by chkr1011 about 6 years ago

  • [Client] Fixed a deadlock when an exception is fired while connecting (thanks to @malibVB).
MQTTnet - v2.8.3

Published by chkr1011 about 6 years ago

  • [Core] Added all factory methods to the factory interface.
  • [Core] Fixed an issue with cancellation token handling (thanks to @acrabb).
  • [Server] Added a new overload for configuring the ASP.net integration (thanks to @JanEggers).
  • [Server] Added a method for clearing all retained messages.
MQTTnet - v2.8.2

Published by chkr1011 about 6 years ago

  • [Core] Performance optimizations.
  • [Client] Added support for proxies when using web socket connections (thanks to @PitySOFT).
  • [Client] Refactored TLS parameter usage and added more parameters (thanks to @PitySOFT).
  • [Client] Fixed a deadlock when clients are disconnecting (thanks to @JanEggers).
  • [ManagedClient] Unsubscriptions are now pushed before subscriptions to support re-subscribing (thanks to @cstichlberger).
  • [Server] Fixed an issue in client keep alive checks (thanks to @jenscski).
  • [Server] Changed the order of ClientConnected and ClientDisconnected events so that ClientConnected is fired at first (thanks to @jenscski).
  • [Server] Fixed an iussue which lets the server stop processing messages when using the application message interceptor (thanks to @alamsor).
  • [Server] Fixed a deadlock when clients are disconnecting (thanks to @JanEggers).
MQTTnet - v2.8.1

Published by chkr1011 over 6 years ago

  • [Core] Performance optimizations.
  • [Core] Fixed a bug which prevents receiving large packets (UWP only)
  • [Client] The ManagedClient options now allow configuring the interval for connection checks.
  • [Server] Added the Endpoint of the Adapter (remote IP and port) to the connection validation callback.
  • [Server] The ipv4 and ipv6 endpoint can be disabled now by setting the bound IP address to None.
  • [Server] Fix a bug in the keep alive monitor which caused high CPU load (thanks to @GarageGadget).
MQTTnet - v2.8.0

Published by chkr1011 over 6 years ago

** MQTTnet is now available at Open Collective for donations (https://opencollective.com/mqttnet). **

  • [Core] Performance optimizations.
  • [Core] Due to performance reasons the timestamp of log messages is now in UTC format.
  • [Core] Added several packet validations.
  • [Core] Log messages now contain the complete source path including parent components.
  • [Core] The adapter now has an Endpoint definition as string containing remote IP and port.
  • [Client] Received messages are now processed completely in the worker thread without creating new Tasks.
  • [Client] Fixed wrong calculation for sending keep alive packets (thanks to @cstichlberger)
  • [Client] A clean disconnect (via DisconnectAsync) will no longer throw an exception.
  • [Client] Added new overloads for quick message publishing.
  • [ManagedClient] The managed client is moved to a separate nuget package.
  • [ManagedClient] Added an own message format with extended properties like ID (BREAKING CHANGE).
  • [ManagedClient] Fixed a loading issue of stored application messages (thanks to @JTrotta).
  • [ManagedClient] Added a new event which is fired when a synchronization of the subscriptions has failed.
  • [ManagedClient] Added a new event which is fired when a connection attempt has failed.
  • [ManagedClient] Exposed a new property which provides the count of not published messages (pending messages count).
  • [Server] Added support for other WebSocket sub protocol formats like mqttv-3.1.1 (thanks to @israellot).
  • [Server] The takeover of an existing client sessions is now treated as a clean disconnect of the previous client.
  • [Server] The pending messages queue per client is now limited to 250 messages. Overflow strategy and count can be changed via options (thanks to @VladimirAkopyan)
  • [Server] Keep alive checking is now suspended while large packages are being received (and thus the client is connected). Keep alive checking continues after a large packet is received completely.
  • [Server] Rewritten the ConnectedClients API and added new features for disconnecting and Endpoint information (IP etc.).
  • [Server] Added settings for disabling persistent sessions and defining a max pending messages queue size per session.
  • [Server] Persistent sessions are disabled by default (BREAKING CHANGE!).
  • [Server] Added a new interceptor which is invoked before a new message is added to the client queue.
  • [Server] Added support for Linux servers by dividing IPv4 and IPv6 support and adding new options (BREAKING CHANGE!).
  • [Server] Gracefully closed connections are no longer reported as warnings.
  • [Server] Added new overloads for initializing the ASP.NET Core integration.
MQTTnet - v2.7.5

Published by chkr1011 over 6 years ago

  • [Client] Fixed a deadlock while the client disconnects.
  • [Client] Fixed broken support for protocol version 3.1.0.
  • [Server] The MqttTcpServerAdapter is now added to the ASP.NET services.
  • [Server] MqttServerAdapter is renamed to MqttTcpServerAdapter (BREAKING CHANGE!).
  • [Server] The server no longer sends the will message of a client if the disconnect was clean (via Disconnect packet).
  • [Server] The application message interceptor now allows closing the connection.
  • [Server] Added a new flag for the ClientDisconnected event which contains a value indicating whether the disconnect was clean (via Disconnect packet).
MQTTnet - v2.7.4

Published by chkr1011 over 6 years ago

  • [Client] Fixed a deadlock while the client disconnects.
  • [Client] Fixed broken support for protocol version 3.1.0.
  • [Server] The MqttTcpServerAdapter is now added to the ASP.NET services.
  • [Server] MqttServerAdapter is renamed to MqttTcpServerAdapter (BREAKING CHANGE!).
  • [Server] The server no longer sends the will message of a client if the disconnect was clean (via Disconnect packet).
  • [Server] The application message interceptor now allows closing the connection.
  • [Server] Added a new flag for the ClientDisconnected event which contains a value indicating whether the disconnect was clean (via Disconnect packet).
MQTTnet - v2.7.3

Published by chkr1011 over 6 years ago

  • [Core] Add several new extension methods.
  • [Client] Fixed an issue in ManagedMqttClientOptionsBuilder when using WithClientOptions and an options builder.
  • [Client] Added the "IsStarted" property for the managed client.
  • [Client] Optimized stream buffer for UWP apps.
  • [Client] Added the BufferSize to the TCP options.
  • [Client] Fixed a race condition which leads to exceptions when reconnecting rapidly.
  • [Server] Fixed a race condition which leads to exceptions when clients are reconnecting rapidly.
  • [Core] Fixed some issues in stream and socket handling.
MQTTnet - v2.7.2

Published by chkr1011 over 6 years ago

  • [Client] Added the subprotocol "mqtt" as default for web socket based connections.
  • [Client] Added a new client setting called "KeepAliveSendInterval". It allows configuring the effective interval for sending ping requests.
  • [Client] The client will no longer send ping requests if other packets are sent within the configured interval.
  • [Server] The server now generates a valid packet identifier when disaptching publish packets to clients.
  • [Core] Add several new extension methods.
MQTTnet - v2.7.1

Published by chkr1011 over 6 years ago

  • [Core] Fixed wrong parsing of ConnAck packet for protocol version 3.1.0.
  • [Core] Log messages are now overriding ToString() and providing a ready to use text representation.
  • [Client] Optimized package dispatcher and added several new exceptions.
  • [Client] The ManagedClient now has an event which is fired after a queued application message was processed (including exception).
  • [Client] The ManagedClient now supports unsubscribing (thanks to @lerppana)
  • [Server] Fixed some minor async issues.
  • [Server] Fixed wrong comparison of the topic and QoS for retained messages.
  • [Server] Added a property which provides access to the used options (read only).
  • [Server] Fixed a null ref expection when using an interceptor and publishing via the server directly.
MQTTnet - v2.7.0

Published by chkr1011 over 6 years ago

  • [Core] Fixed some still thread blocking parts in the code (thanks to @kpreisser).
  • [Core] Updated 3rd-Party packages.
  • [Core] Fixed wrong packet identifier calculation (thanks to @benpittoors).
  • [Core] Fixed an issue when reading the body of a package from a disconnected sender (thanks to @kpreisser).
  • [Core] Fixed wrong parsing of the body length (thanks to @kpreisser).
  • [Client] The client interfaces are now implementing IDisposable.
  • [Client] The disconnected event now contains the exception which was thrown and causing the disconnect.
  • [Server] Fixed an issue which lets the server block 1 second after accepting a new connection (thanks to @kpreisser).
  • [Server] The server now allows managing client subscriptions.
  • [Server] Added events for topic subscriptions.
MQTTnet - v2.6.0

Published by chkr1011 over 6 years ago

  • [Core] Merged projects (BREAKING CHANGE! But only namespace changes).
  • [Core] Added a strong name for the assembly.
  • [Core] Performance optimizations.
  • [Core] Fixed a logging issue when dealing with IOExceptions.
  • [Core] Fixed a typo in the global logger class (BREAKING CHANGE! Please find new example in Wiki).
  • [Core] Added support for project compilation under macOS (Thanks to @FourOnes).
  • [Client] The certificate for encryption is now loaded as a X509Certificate2 which prodives more data (Thanks to @cvellan).
  • [Client] Fixed an issue in ManagedClient which can cause the client to stop when publishing subscriptions.
  • [Client] Fixed an issue in ManagedClient which prevents changing the QoS of an existing subscription (BREAKING CHANGE!).
  • [Client] Fixed an issue in MqttClientOptionsBuilder which prevents adding TLS options to the client options when calling Build(). (Thanks to @cvellan).
  • [Client] Added an overload for subscribing at both clients which reduces required code.
  • [Client] Added the ClientId to the application message interceptor context.
  • [Server] The application message interceptor can now delete any received application message.
  • [Server] Added a ConnectionValidator context to align with other APIs (BREAKING CHANGE! Please find new example in Wiki).
  • [Server] Added an interface for the MqttServerOptions.
  • [Server] Added packet statistics for the connected clients.
  • [Server] Fixed a security issue which sends retained packages to a failed subscription.
  • [Server] Fixed the response (MaximumQoS) of a subscription (Thanks to @redbeans2017).
  • [Server] The keep alive timeouts are now checked for every client (Thanks to @RainerMueller82).
  • [Server] The used IP addresses can be specified now (IPAddress.Any as default).
MQTTnet - v2.5.3

Published by chkr1011 almost 7 years ago

  • [Core] Removed all dependencies to other libraries (BREAKING CHANGE!).
  • [Core] Updated SDK libraries.
  • [Client] Fixed broken support for WebSocketSecure connections (Thanks to @StAI).
MQTTnet - v2.5.2

Published by chkr1011 almost 7 years ago

  • [Core] Refactored trace messages.
MQTTnet - v2.5.2-rc1

Published by chkr1011 almost 7 years ago

  • [Core] Fixed library reference issues for .NET 4.6 and netstandard 2.0 (Thanks to @JanEggers).
  • [Core] Several COM exceptions are now wrapped properly resulting in less warnings in the trace.
  • [Core] Removed application message payload from trace to reduce trace size and increase performance.
  • [Client] Fixed WebSocket sub protocol negotiation for ASP.NET Core 2 servers (Thanks to @JanEggers).
  • [Client] Fixed broken connection after 30 seconds then using WebSocket protocol (Thanks to @ChristianRiedl).
  • [Server] Client connections are now closed when the server is stopped (Thanks to @zhudanfei).
  • [Server] Published messages from the server are now retained (if set) (Thanks to @ChristianRiedl). BREAKING CHANGE!

Fixed tickets:
#114, #103, #93, #113, #112, #110, #100, #91

Package Rankings
Top 10.05% on Proxy.golang.org
Badges
Extracted from project README
NuGet Badge CI MyGet Join the chat at https://gitter.im/MQTTnet/community License: MIT
Related Projects