FluxFlow.Components.Mqtt 0.5.0-alpha.1

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

FluxFlow.Components.Mqtt

MQTT component package for FluxFlow.

This package keeps protocol-specific nodes outside FluxFlow.Engine while preserving the same runtime registration model.

Nodes

Node type Shape Purpose
mqtt.publish Input → Result Publishes MqttPublishRequest values through an adapter.
mqtt.subscribe source → Output Emits MqttReceivedMessage values from an adapter subscription.

The package does not include a concrete network client. Applications provide an adapter through RegisterMqttComponents.

var registry = new RuntimeNodeFactoryRegistry()
    .RegisterMqttComponents((context, cancellationToken) =>
        ValueTask.FromResult(MqttClientLease.Owned(
            new AppMqttClientAdapter(context.Profile))));

Options are static node settings. Requests and messages are per-item data.

MqttClientFactoryContext includes the runtime node address, connection name, and connection profile. Hosts can use ConnectionName to resolve app-owned resources instead of placing all broker settings inline.

Return MqttClientLease.Owned(adapter) when the node should dispose the adapter. Return MqttClientLease.Shared(adapter) when the host owns a shared client lifetime.

Subscriptions return IMqttSubscription; once SubscribeAsync returns, startup is considered successful. Each subscription should expose an independent message stream so shared clients can safely serve multiple nodes.

Runtime Timing

Use MqttComponentOptions.UseClock(...) when tests or hosts need deterministic package-owned timestamps.

var registry = new RuntimeNodeFactoryRegistry()
    .RegisterMqttComponents(options => options
        .UseClientFactory(factory)
        .UseClock(testClock));

mqtt.publish uses the configured clock for MqttPublishResult.Timestamp. MQTT publish, subscribe, and connection health events also use that clock for their FlowEvent.Timestamp values.

Incoming MqttReceivedMessage.Timestamp values stay adapter-owned because they represent when the adapter observed the broker message. Adapter-provided MqttClientHealthEvent.Timestamp values also stay adapter-owned, while the emitted workflow event timestamp uses the configured package clock.

Adapter Health

Adapters that also implement IMqttClientHealthSource can expose connection health transitions. mqtt.publish and mqtt.subscribe forward those values as diagnostics and events named mqtt.connection.healthChanged.

The package does not own reconnect policy. Adapters decide how to connect, reconnect, and report state.

Reconnect Policy Hints

Nodes can optionally set reconnect to pass policy hints to the host adapter through MqttClientFactoryContext.Reconnect.

{
  "type": "mqtt.publish",
  "name": "publisher",
  "defaultTopic": "devices/state",
  "reconnect": {
    "enabled": true,
    "maxAttempts": 5,
    "initialDelayMilliseconds": 100,
    "maxDelayMilliseconds": 5000,
    "backoffMultiplier": 2,
    "useJitter": true
  }
}

These values are advisory. The package validates them and passes them to the adapter factory. The adapter still owns connection state, retry loops, shared client behavior, and broker-specific recovery.

Topic validation

Use MqttTopicValidator.ValidatePublishTopic and MqttTopicValidator.ValidateSubscriptionFilter when projecting host settings or building requests.

Publish topics must be present and cannot contain MQTT wildcards. Subscription filters may use + as a complete level and # only as the final complete level. Both helpers also reject null characters and oversized encoded topics.

Composition Guidance

Use this package as one part of a host-composed graph. See Component Composition for recommended host boundaries, package boundaries, and extraction timing.

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 (3)

Showing the top 3 NuGet packages that depend on FluxFlow.Components.Mqtt:

Package Downloads
FluxFlow.Components.Mqtt.PulseMqtt

Concrete MQTT transport adapter for FluxFlow. Maps resolved client configuration, exact message bytes, subscriptions, and broker acknowledgements while the provider-neutral MQTT core owns client policy and workflow behavior.

FluxFlow.Components.Mqtt.MqttNet

Concrete MQTT transport adapter for FluxFlow. Maps resolved client configuration, exact message bytes, subscriptions, and broker acknowledgements while the provider-neutral MQTT core owns client policy and workflow behavior.

FluxFlow.Components.Mqtt.Composition

Canonical FluxFlow Composition resources and nodes for provider-neutral MQTT client control, publication, subscriptions, and client events.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0-rc.1 114 9/5/2026
7.1.0 193 8/9/2026
7.0.0 209 8/3/2026
4.1.4 177 7/3/2026
4.1.3 238 7/2/2026
4.0.0 183 6/20/2026
3.0.0 128 6/19/2026
2.0.0 147 6/18/2026
1.2.1 126 6/15/2026
1.2.0 428 6/12/2026
1.1.0 127 6/5/2026
1.0.0 126 6/4/2026
0.5.0-alpha.1 252 6/3/2026
0.4.0-alpha.1 80 6/2/2026
0.3.0-alpha.1 78 6/2/2026
0.2.2-alpha.1 84 6/2/2026
0.2.1-alpha.1 135 5/31/2026
0.2.0-alpha.1 83 5/31/2026
0.1.0-alpha.1 83 5/31/2026

Adds adapter-owned reconnect policy hints to MQTT client factory context.