Parley.Mqtt 1.0.1

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

Parley.Mqtt

CI NuGet License: MIT

Request/response RPC over MQTT — the transport-free protocol core, C# reference implementation.

dotnet add package Parley.Mqtt

Parley turns the MQTT broker you already share into something you can make requests over — request/reply, not just publish/subscribe. Call a command on another service or device, stream progress while it runs, cancel it, and receive one typed result: success or a clear error. Each command is four topic strings you choose, and every message carries a correlation id, so many calls share the same topics.

One wire protocol, four parallel reference libraries — C#, TypeScript/JS, Python and C++ (ESP32/Arduino) — so a .NET service, an edge script, a Python service and firmware can all call each other over the broker they already share. Parley.Mqtt is the C# one (the assembly and namespace stay Parley). It is a small library, not a server: it rides your existing MQTT connection and never holds your broker credentials or TLS material.

  • Targets net10.0 and netstandard2.0. Trim- and AOT-friendly via source-generated JSON; request, progress, result and error types are bound with ordinary generics — no schema compiler, no code generation, no build step.
  • Zero MQTT-client dependency. You supply a live connection through a tiny adapter you write over MQTTnet or whatever you already use, and Parley needs only MQTT 3.1.1 — no MQTT 5 broker required.
  • Three distinct liveness outcomes. Nobody answered ($noAck), it accepted and then went silent ($executionStale) and it ran too long ($executionTimeout) are separate results, driven by per-execution heartbeats rather than one guessed stopwatch.
  • At-most-once execution, correct even at QoS 0. Requests are re-sent until the other side shows a sign of life, results are re-sent until acknowledged, and duplicates are recognized and dropped on both sides. The guarantee is at most once per handler process lifetime, for as long as the handler retains dedup/tombstone state for that command id — the residual cases are written down in §9 of the protocol spec.
  • Cancellation that reaches the running handler — a CancellationToken puts a real cancel on the wire, not a local give-up. Plus advisory progress streaming (IProgress<T>) and six built-in error codes alongside your own.
var topics = new ParleyTopics("home/backup/req", "home/backup/hb", "home/backup/prg", "home/backup/res");
using var commander = new ParleyCommander<BackupRequest, BackupProgress, BackupResult, string>(
    adapter, topics, new ParleyConfig(), BackupJsonContext.Default);

var progress = new Progress<BackupProgress>(p => Console.WriteLine($"{p.Percent}%"));
ParleyResult<BackupResult, string> result =
    await commander.ExecuteAsync(new BackupRequest("photos"), progress: progress);

if (result.IsSuccess) Console.WriteLine(result.Value!.BytesWritten);
else Console.WriteLine(result.Error.Code);

Documentation

License

MIT © The Parley Authors.

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 was computed.  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 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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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
1.0.1 160 7/23/2026
1.0.0 119 7/23/2026