EasyMQTTnet 2.0.0

dotnet add package EasyMQTTnet --version 2.0.0
                    
NuGet\Install-Package EasyMQTTnet -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EasyMQTTnet" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EasyMQTTnet" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="EasyMQTTnet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EasyMQTTnet --version 2.0.0
                    
#r "nuget: EasyMQTTnet, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EasyMQTTnet@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EasyMQTTnet&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=EasyMQTTnet&version=2.0.0
                    
Install as a Cake Tool

EasyMQTTnet

A .NET API for Message Queuing with MQTT

Build NuGet Status

Goals:

  1. To make working with Message Queuing on .NET as easy as possible.

To connect to a MQTT broker...

var bus = EasyMqttFactory.CreateBus("server=localhost");

To publish a message...

bus.Publish(message);

To subscribe to a message...

bus.Subscribe<MyMessage>(msg => Console.WriteLine(msg.Text));

The goal of EasyMQTTnet is to provide a library that makes working with Message Queuing in .NET as simple as possible. In order to do this, it has to take an opinionated view of how you should use EasyMQTTnet with .NET. It trades flexibility for simplicity by enforcing some simple conventions. These include:

  • Messages should be represented by .NET types.
  • Messages should be routed by their .NET type.

This means that messages are defined by .NET classes. Each distinct message type that you want to send is represented by a class. The class should be public with a default constructor and public read/write properties. You would not normally implement any functionality in a message, but treat it as a simple data container or Data Transfer Object (DTO). Here is a simple message:

public class MyMessage
{
    public string Text { get; set; }
}

EasyMQTTnet routes messages by their type. When you publish a message, EasyMQTTnet examines its type and gives it a routing key based on the type name, namespace and assembly. On the consuming side, subscribers subscribe to a type. After subscribing to a type, messages of that type get routed to the subscriber.

By default, EasyMQTTnet serializes .NET types as JSON using the Newtonsoft.Json library. This has the advantage that messages are human readable, so you can use tools to debug message problems.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 265 8/25/2025
1.1.17 461 6/9/2023
1.1.5 454 11/26/2022
1.1.0 584 6/7/2022
1.0.16 614 1/30/2022
1.0.15 978 12/3/2021
1.0.9 448 11/9/2021
1.0.5 441 8/30/2021
1.0.4 547 3/4/2021
1.0.3 536 2/25/2021
1.0.2 557 1/6/2021
1.0.1 640 9/1/2020
1.0.0 712 8/11/2020