A collection of MQTT message transformation, monitoring, and analytics examples built with .NET.
This repository explores techniques for:
- MQTT message ingestion and republishing
- Message transformation pipelines
- Dynamic C# script-based transformations
- MQTT loopback testing
- Device liveness monitoring
- Spike detection
- Change-point detection
- ML.NET-based analytics for MQTT telemetry
The repository contains several sample projects focused on different MQTT processing scenarios. [github.com]
src/
├── HiveMQClient/
├── IMessageTransformer/
├── LightGBMBinaryClassificationTrainer/
├── LightGBMDataGeneratorEvT/
├── LightGBMMultiClassClassificationTrainer/
├── LightGBMRegressionTrainer/
├── MQTTChangePointDetection/
├── MQTTCLientCodeLoopback/
├── MQTTChangePointDetection/
├── MQTTCLientCodeLoopback/
├── MQTTClientCSScriptDynamicLoadingLoopback/
├── MQTTClientCSScriptLoopback/
├── MQTTDeviceSimulator/
├── MQTTLightGBM/
├── MQTTLivenessMonitor/
├── MQTTSpikeDetection/
├── MQTTSRCNNSpikeDetection/
├── NFMQTTUltrasonicRanger/
└── MQTTMachineLearningWithMLNET.slnx
Use C# scripts to transform MQTT payloads without rebuilding applications.
Detect unusual telemetry patterns including:
- Sudden spikes
- Sensor drift
- Change points in streaming data
Monitor MQTT-connected devices and identify offline or unresponsive nodes.
Experiment with ML.NET models for real-time telemetry analysis and event detection.
- IoT sensor monitoring
- Edge-to-cloud telemetry processing
- MQTT topic routing
- Sensor anomaly detection
- Industrial monitoring
- Rapid prototyping of MQTT transformations
MQTT Publisher
│
▼
MQTT Broker
│
▼
Message Consumer
│
▼
Transformation Engine
│
├── Rule-Based Processing
├── C# Script Processing
├── Spike Detection
├── Change Detection
└── ML.NET Analysis
│
▼
MQTT Publisher / Alerts / Storage
- These projects are intended as experiments and learning exercises.
- Error handling, security, and production readiness may vary between PoCs.
Blog posts will be published once I build a couple more nanoFramework apps to collect some training data *
-
Real-time ML.Net Regression with LightGBM
-
Real-time ML.Net Binary classification with LightGBM
-
Real-time ML.Met Multi class classification with LightGBM
The MQTT examples should be considered as "snappy" rather than "real-time". For embedded/edge compute "real-time" is different often with specified values for up-time, duration, latency and jitter.
MIT License