PLCcom.Mqtt.Broker 2.2.1

dotnet add package PLCcom.Mqtt.Broker --version 2.2.1
                    
NuGet\Install-Package PLCcom.Mqtt.Broker -Version 2.2.1
                    
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="PLCcom.Mqtt.Broker" Version="2.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PLCcom.Mqtt.Broker" Version="2.2.1" />
                    
Directory.Packages.props
<PackageReference Include="PLCcom.Mqtt.Broker" />
                    
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 PLCcom.Mqtt.Broker --version 2.2.1
                    
#r "nuget: PLCcom.Mqtt.Broker, 2.2.1"
                    
#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 PLCcom.Mqtt.Broker@2.2.1
                    
#: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=PLCcom.Mqtt.Broker&version=2.2.1
                    
Install as a Cake Addin
#tool nuget:?package=PLCcom.Mqtt.Broker&version=2.2.1
                    
Install as a Cake Tool

PLCcom.Mqtt.Broker

A modern, easy-to-use MQTT broker for .NET — supporting both MQTT 3.1.1 and MQTT 5.0. Host your own broker embedded in an application or as a standalone service, with just a few lines of code.

Runs on .NET Framework 4.7.2+, .NET Standard 2.1, .NET 8, .NET 9 and .NET 10.


What you get

  • A full MQTT broker you can embed in your own .NET application
  • MQTT 3.1.1 and MQTT 5.0 clients on the same broker
  • Multiple listeners — plain TCP, TLS, WebSocket and secure WebSocket, side by side
  • Access control — pluggable authentication and per-topic authorization
  • Sessions, retained messages, Last-Will, shared subscriptions
  • Custom persistence through a store interface (retained messages / sessions)
  • Built-in diagnostics through a single listener interface

Getting started

1. Install the package

Install-Package PLCcom.Mqtt.Broker

2. A license is required

Every broker needs your PLCcom license (user name + serial). Without a valid key the software may be used for test purposes for a limited time — see the included EULA for details. The license is supplied once, on the builder (.WithLicense(...)).

3. Start a broker — C#

using PLCcom.Mqtt.Broker;

// Build and start the broker — the license is set once, here on the builder.
PlccomMqttBroker broker = new PlccomMqttBrokerBuilder()
    .WithLicense("<Your UserName>", "<Your Serial>")
    .WithTcpListener("127.0.0.1", 1883)   // add more with AddTlsListener / AddWebSocketListener
    .Start();

// The broker reports the port it actually bound to.
Console.WriteLine($"Broker listening on mqtt://127.0.0.1:{broker.BoundListeners[0].Port}");

// ... broker is now accepting connections ...

broker.Stop();

The same in Visual Basic

Imports PLCcom.Mqtt.Broker

' Build and start the broker — the license is set once, here on the builder.
Dim broker As PlccomMqttBroker = New PlccomMqttBrokerBuilder().
    WithLicense("<Your UserName>", "<Your Serial>").
    WithTcpListener("127.0.0.1", 1883).
    Start()

Console.WriteLine("Broker listening on mqtt://127.0.0.1:" & broker.BoundListeners(0).Port.ToString())

' ... broker is now accepting connections ...

broker.Stop()

With no access validator configured, the broker uses a default open policy (anonymous clients allowed) — convenient for local tests. For production, supply an access validator via .WithAccessValidator(...) to authenticate clients and authorize topic access.

More listeners at once

PlccomMqttBroker broker = new PlccomMqttBrokerBuilder()
    .WithLicense("<Your UserName>", "<Your Serial>")
    .AddTcpListener("0.0.0.0", 1883)
    .AddWebSocketListener("0.0.0.0", 8080)
    .WithMaxConnections(1000)
    .Start();

Need a client too?

Add PLCcom.Mqtt.Client for a matching high-level MQTT client. Client and broker share the same diagnostics and result types, so they pair naturally.


System requirements

  • Microsoft .NET Framework 4.7.2 or higher (up to 4.8.1)
  • Microsoft .NET 5.0 to 7.0 via .NET Standard 2.1
  • Microsoft .NET 8.0, .NET 9.0 and .NET 10.0

To build and run the included examples: Visual Studio 2022 or higher.


Examples & documentation


© Indi.An GmbH. Use of this software is subject to the End User License Agreement included in this package (EULA_PLCcom_MQTT_en_06-2026.txt).

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 is compatible.  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 is compatible.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net472 is compatible.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.2.1 0 7/28/2026
2.1.2 82 7/13/2026