MarbleSoft.FlowModule.MQTTLogger 1.4.3

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

MarbleSoft.FlowModule.MQTTLogger

MQTTLogger publishes log messages over MQTT and enriches flow messages with logging context. The only required field is message. All other fields are optional and are filled by the module when missing.

How It Works

  1. Receives a message from the flow with a log entry at the configured source property (default: data)
  2. Extracts level from the message payload or uses the configured default (default: Info)
  3. Enriches optional metadata when missing:
  • timestamp as UTC ISO 8601 with milliseconds
  • traceId from trace context in message (data.headers.traces.flowChain, header.trace, trace)
  • flowId and flow (flow name) from runtime/environment fallback
  • module fallback to current module name
  1. Stores in flow message at the configured target property (default: data.logging)
  2. Publishes to MQTT using the configured topic and settings

Example Input

{
  "data": {
    "message": "Pack successfully created"
  }
}

Example Output (Flow Message)

{
  "data": {
    "message": "Pack successfully created"
  },
  "data.logging": {
    "timestamp": "2026-07-21T18:42:15.384Z",
    "level": "Information",
    "event": "PackCreated",
    "module": "TraceFinalizer",
    "flow": "PackCreation",
    "flowId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "machineId": "Machine-07",
    "traceId": "abc-123",
    "message": "Pack successfully created",
    "success": true
  }
}

MQTT Publication Example

When MQTT is enabled, the module publishes:

Topic: logging (default topic, configurable)

Message:

{
  "timestamp": "2026-07-21T18:42:15.384Z",
  "level": "Information",
  "flow": "PackCreation",
  "flowId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "traceId": "abc-123",
  "message": "Pack successfully created"
}

Configuration

  • Source (default: data): Property path to read the log entry from
  • Target (default: data.logging): Property path to write the enriched log context to
  • DefaultLogLevel (default: Info): Log level when not specified in the message (level or logLevel)
  • Topic (default: logging): MQTT topic to publish to
  • Enabled: Set to true to enable MQTT publishing; when false, logs are only added to the flow message

Log Levels

Valid log levels (case-insensitive):

  • Debug
  • Info
  • Warning
  • Error
  • Critical

Settings

  1. Source
  • Type: string
  • Required: yes
  • Validation: min length 1, max length 256
  • Default: data
  • Purpose: path used to read an existing log context
  1. Target
  • Type: string
  • Required: yes
  • Validation: min length 1, max length 256
  • Default: data.logging
  • Purpose: path used to write the log context
  1. Default Log Level
  • Type: string
  • Required: no
  • Default: Info
  • Purpose: default level used when no LogLevel field is present in the message payload
  1. MQTT publish settings (optional)
  • Enable MQTT Publish: bool, default true
  • MQTT Source Property: string path, default data, if empty the payload from Source is used
  • MQTT Topic: string, required when MQTT is enabled, default logging
  • MQTT Brokers: comma or line separated host:port list, default localhost:1883
  • MQTT Protocol Version: enum V311 or V500
  • Use TLS: bool, default true
  • SSL Protocol: enum None, Tls12, Tls13
  • Allow Untrusted Certificates: bool
  • ClientId: optional string, generated automatically when empty
  • CA Certificate: optional Crosser Certificate credential selector
  • Client Certificate: optional Crosser Certificate credential selector
  • MQTT User Credential: optional Crosser UsernamePassword credential selector
  • QoS: AtMostOnce, AtLeastOnce, ExactlyOnce
  • Retain: bool

Runtime behavior

  • Reads payload from Source.
  • Uses payload field message (or msg) as required message content.
  • Sets timestamp to UTC ISO 8601 with milliseconds when missing.
  • Sets level from payload (level/logLevel) or DefaultLogLevel.
  • Resolves traceId from the trace context when not present in payload.
  • Resolves flowId and flow from runtime/environment when not present in payload.
  • Uses payload module when present; otherwise current module name.
  • Writes the enriched context to Target and publishes to MQTT when enabled.
Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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
1.6.0 0 9/15/2026
1.5.9 42 9/14/2026
1.5.8 51 9/14/2026
1.5.7 52 9/11/2026
1.5.6 49 9/11/2026
1.5.5 49 9/11/2026
1.5.4 52 9/10/2026
1.5.3 44 9/10/2026
1.5.2 53 9/10/2026
1.5.1 52 9/10/2026
1.5.0 107 8/4/2026
1.4.3 105 7/30/2026
1.4.2 103 7/21/2026
1.4.1 101 7/21/2026

N/A