FluxFlow.Components.Mqtt.MqttNet 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FluxFlow.Components.Mqtt.MqttNet --version 1.0.0
                    
NuGet\Install-Package FluxFlow.Components.Mqtt.MqttNet -Version 1.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="FluxFlow.Components.Mqtt.MqttNet" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FluxFlow.Components.Mqtt.MqttNet" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="FluxFlow.Components.Mqtt.MqttNet" />
                    
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 FluxFlow.Components.Mqtt.MqttNet --version 1.0.0
                    
#r "nuget: FluxFlow.Components.Mqtt.MqttNet, 1.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 FluxFlow.Components.Mqtt.MqttNet@1.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=FluxFlow.Components.Mqtt.MqttNet&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=FluxFlow.Components.Mqtt.MqttNet&version=1.0.0
                    
Install as a Cake Tool

FluxFlow.Components.Mqtt.MqttNet

MQTTnet-backed adapter for FluxFlow.Components.Mqtt.

The core MQTT package stays client-library-neutral: MqttPublishNode needs only IMqttPublisher, and MqttTriggerNode needs only IMqttTriggerSource. This package supplies one concrete session object, MqttNetClient, that implements:

  • IMqttPublisher
  • IMqttTriggerSource
  • IMqttClientHealthSource

MqttNetClient owns MQTT client creation, broker connection, Last Will configuration, reconnect, publish mapping, subscription streams, manual acknowledgement, and health events.

Usage

var mqtt = new MqttNetClient(new MqttNetClientOptions
{
    Host = "localhost",
    Port = 1883,
    ClientId = "fluxflow-worker",
    LastWill = new MqttNetLastWillOptions
    {
        Topic = "workers/fluxflow/status",
        Payload = "offline"u8.ToArray(),
        Retain = true,
        QualityOfService = MqttQualityOfService.AtLeastOnce,
        ContentType = "text/plain"
    }
});

await mqtt.ConnectAsync();

var publish = new MqttPublishNode(mqtt);
var trigger = new MqttTriggerNode(mqtt, new MqttTriggerOptions
{
    TopicFilter = "commands/+",
    Mode = MqttTriggerMode.RequestReply,
    Acknowledgement = MqttTriggerAcknowledgement.OnSuccessfulResponse
});

Call ConnectAsync before using the object as a publisher or trigger source. When the MQTT client is disconnected, publish and subscribe throw MqttClientUnavailableException, which the core nodes translate into their not-connected diagnostics.

Last Will

Last Will is adapter-owned because it is registered during MQTT CONNECT. It is configured through MqttNetClientOptions.LastWill, not through publish or trigger node options. Use a normal MqttPublishRequest for graceful online/offline status messages.

Acknowledgement

For trigger subscriptions with Acknowledgement.None, MQTTnet auto-acknowledges received messages. For OnEmit and OnSuccessfulResponse, the adapter disables auto acknowledgement and exposes AckAsync/NackAsync on each received context. NackAsync maps to MQTTnet processing failure metadata and then completes the MQTT acknowledgement path; MQTT broker retry behavior depends on broker and protocol support.

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 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. 
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
4.0.0-rc.1 78 9/5/2026
3.1.0 132 8/9/2026
3.0.0 129 8/3/2026
1.1.8 138 7/3/2026
1.1.7 130 7/2/2026
1.0.0 134 6/20/2026

Initial MQTTnet adapter package for FluxFlow MQTT components. Adds an explicit client-session object that implements IMqttPublisher, IMqttTriggerSource, and IMqttClientHealthSource, including broker connection options, Last Will configuration, publish mapping, subscription streams, manual acknowledgement hooks, and connection health events.