MarbleSoft.FlowModule.MQTTLogger
1.5.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MarbleSoft.FlowModule.MQTTLogger --version 1.5.0
NuGet\Install-Package MarbleSoft.FlowModule.MQTTLogger -Version 1.5.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="MarbleSoft.FlowModule.MQTTLogger" Version="1.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MarbleSoft.FlowModule.MQTTLogger" Version="1.5.0" />
<PackageReference Include="MarbleSoft.FlowModule.MQTTLogger" />
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.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MarbleSoft.FlowModule.MQTTLogger, 1.5.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 MarbleSoft.FlowModule.MQTTLogger@1.5.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=MarbleSoft.FlowModule.MQTTLogger&version=1.5.0
#tool nuget:?package=MarbleSoft.FlowModule.MQTTLogger&version=1.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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. The module also supports an items field to carry key/value-style metadata into the log output.
How It Works
- Receives a message from the flow with a log entry at the configured source property (default:
data) - Extracts level from the message payload or uses the configured default (default:
Info) - Enriches optional metadata when missing:
timestampas UTC ISO 8601 with millisecondstraceIdfrom trace context in message (data.headers.traces.flowChain,header.trace,trace)flowIdandflow(flow name) from runtime/environment fallbackmodulefallback to current module name
- Stores in flow message at the configured target property (default:
data.logging) - 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,
"items": [
{ "key": "orderId", "value": "A-1001" },
{ "key": "count", "value": 2 }
]
}
}
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 (levelorlogLevel) - Topic (default:
logging): MQTT topic to publish to - Enabled: Set to
trueto enable MQTT publishing; whenfalse, logs are only added to the flow message
Log Levels
Valid log levels (case-insensitive):
DebugInfoWarningErrorCritical
Settings
- Source
- Type: string
- Required: yes
- Validation: min length 1, max length 256
- Default: data
- Purpose: path used to read an existing log context
- Target
- Type: string
- Required: yes
- Validation: min length 1, max length 256
- Default: data.logging
- Purpose: path used to write the log context
- Default Log Level
- Type: string
- Required: no
- Default: Info
- Purpose: default level used when no
LogLevelfield is present in the message payload
- 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(ormsg) as required message content. - Sets
timestampto UTC ISO 8601 with milliseconds when missing. - Sets
levelfrom payload (level/logLevel) orDefaultLogLevel. - Resolves
traceIdfrom the trace context when not present in payload. - Resolves
flowIdandflowfrom runtime/environment when not present in payload. - Uses payload
modulewhen present; otherwise current module name. - Writes the enriched context to Target and publishes to MQTT when enabled.
| Product | Versions 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.
-
net9.0
- Crosser.EdgeNode.Flows (>= 5.0.0)
- MQTTnet (>= 4.0.0.167)
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.1 | 0 | 9/15/2026 |
| 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