PLCcom.Mqtt.Client
2.1.2
dotnet add package PLCcom.Mqtt.Client --version 2.1.2
NuGet\Install-Package PLCcom.Mqtt.Client -Version 2.1.2
<PackageReference Include="PLCcom.Mqtt.Client" Version="2.1.2" />
<PackageVersion Include="PLCcom.Mqtt.Client" Version="2.1.2" />
<PackageReference Include="PLCcom.Mqtt.Client" />
paket add PLCcom.Mqtt.Client --version 2.1.2
#r "nuget: PLCcom.Mqtt.Client, 2.1.2"
#:package PLCcom.Mqtt.Client@2.1.2
#addin nuget:?package=PLCcom.Mqtt.Client&version=2.1.2
#tool nuget:?package=PLCcom.Mqtt.Client&version=2.1.2
PLCcom.Mqtt.Client
A modern, easy-to-use MQTT client for .NET — supporting both MQTT 3.1.1 and MQTT 5.0. Connect, publish, subscribe and receive with just a few lines of code, without having to learn the MQTT wire protocol first.
Runs on .NET Framework 4.7.2+, .NET Standard 2.1, .NET 8, .NET 9 and .NET 10.
What you get
- A comfortable high-level client — connect, subscribe, publish and receive with a fluent builder
- MQTT 3.1.1 and MQTT 5.0 — choose the protocol per connection, or let the client auto-negotiate
- All three Quality-of-Service levels — QoS 0 (at most once), 1 (at least once), 2 (exactly once)
- Automatic keep-alive, sessions and reconnect, plus Last-Will support
- TLS (
mqtts://) and WebSocket (ws://,wss://) transports - MQTT 5 features — retained messages, topic aliases, shared subscriptions, request/response, enhanced authentication
- Built-in diagnostics through a single listener interface
Getting started
1. Install the package
Install-Package PLCcom.Mqtt.Client
2. A license is required
Every client 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. Connect, subscribe, publish and receive — C#
using PLCcom.Mqtt.Client;
// Build the client — the license is set once, here on the builder.
PlccomMqttClient client = new PlccomMqttClientBuilder()
.WithLicense("<Your UserName>", "<Your Serial>")
.WithIdentifier("my-first-client")
.WithEndpoint("mqtt://localhost:1883") // mqtt:// mqtts:// ws:// wss://
.UseMqtt311() // or .UseMqtt5() / .UseAutoProtocol()
.WithKeepAliveSeconds(30)
.Build();
client.Connect();
// Subscribe — a Topic Filter may use the wildcards + (one level) and # (the rest).
client.CreateSubscribeBuilder("plccom/demo/#").WithQos1().Send();
// Publish — a Topic Name is exact and has no wildcards.
client.CreatePublishBuilder("plccom/demo/hello", "Hello MQTT").WithQos1().Send();
// Receive the next message (waits up to 3000 ms).
PlccomMqttMessage message = client.Receive(3000);
Console.WriteLine($"{message.TopicName} = {message.GetPayloadText()}");
client.Dispose();
The same in Visual Basic
Imports PLCcom.Mqtt.Client
' Build the client — the license is set once, here on the builder.
Dim client As PlccomMqttClient = New PlccomMqttClientBuilder().
WithLicense("<Your UserName>", "<Your Serial>").
WithIdentifier("my-first-client").
WithEndpoint("mqtt://localhost:1883").
UseMqtt311().
WithKeepAliveSeconds(30).
Build()
client.Connect()
client.CreateSubscribeBuilder("plccom/demo/#").WithQos1().Send()
client.CreatePublishBuilder("plccom/demo/hello", "Hello MQTT").WithQos1().Send()
Dim message As PlccomMqttMessage = client.Receive(3000)
Console.WriteLine(message.TopicName & " = " & message.GetPayloadText())
client.Dispose()
Every high-level call returns a result object (PlccomMqttConnectResult,
PlccomMqttSubscribeResult, PlccomMqttPublishResult, …) that carries an IsGood
flag together with Quality and Message, so you can check success explicitly:
PlccomMqttConnectResult result = client.Connect();
if (!result.IsGood)
Console.WriteLine($"CONNECT failed: {result.Quality} - {result.Message}");
Need a broker too?
Add PLCcom.Mqtt.Broker to host your own MQTT broker — embedded in the same application or standalone. Client and broker share the same diagnostics and result types.
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
- Ready-to-run C# and Visual Basic workshops: https://github.com/indi-an-gmbh/PLCcom-mqtt-example-dotnet
- Product overview: https://www.indi-an.com/en/plccom/mqtt/
- Questions or feedback: support@indi-an.com
© 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 | Versions 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. |
-
.NETFramework 4.7.2
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- PLCcom.Mqtt.Core (>= 2.1.2)
- System.Text.Json (>= 10.0.9)
-
.NETFramework 4.8
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- PLCcom.Mqtt.Core (>= 2.1.2)
- System.Text.Json (>= 10.0.9)
-
.NETStandard 2.1
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- PLCcom.Mqtt.Core (>= 2.1.2)
- System.Text.Json (>= 10.0.9)
-
net10.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- PLCcom.Mqtt.Core (>= 2.1.2)
-
net8.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- PLCcom.Mqtt.Core (>= 2.1.2)
- System.Text.Json (>= 10.0.9)
-
net9.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- PLCcom.Mqtt.Core (>= 2.1.2)
- System.Text.Json (>= 10.0.9)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on PLCcom.Mqtt.Client:
| Package | Downloads |
|---|---|
|
PLCcom.Opc.Ua.PubSub
PLCcom.Opc.Ua.PubSub is a high-level .NET library for building OPC UA PubSub publisher and subscriber applications. It supports brokerless UDP/UADP (unicast and multicast) and broker-based MQTT transport with both UADP binary and JSON encoding, including MQTT TLS (mqtts://) and mutual TLS (mTLS). The fluent API requires only a few lines of code to publish or subscribe to OPC UA data sets. Runs cross-platform on .NET Framework 4.7.2+, .NET Standard 2.1, .NET 8, .NET 9, and .NET 10. Requires a valid PLCcom.Opc.Ua.PubSub license (30-day trial available). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.2 | 98 | 7/13/2026 |