Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rikj000/saunter-mqttnet-aspnet5-attributerouting-exampleproject

An example project that implements Saunter + MQTTnet + MQTTnet.AspNetCore.AttributeRouting in ASP.NET 5
https://github.com/rikj000/saunter-mqttnet-aspnet5-attributerouting-exampleproject

asp-net-5 asyncapi mqtt mqtt-broker mqttnet saunter

Last synced: about 7 hours ago
JSON representation

An example project that implements Saunter + MQTTnet + MQTTnet.AspNetCore.AttributeRouting in ASP.NET 5

Awesome Lists containing this project

README

        

# Saunter MQTTnet AspNet5 AttributeRouting ExampleProject



Total Releases Downloaded from GitHub

Latest Official Release on GitHub

MIT License

The current place where you can find all Saunter-MQTTnet-AspNet5-AttributeRouting-ExampleProject Documentation!

ICONOMI - The world’s largest crypto strategy provider

Buy me a Coffee as a way to sponsor this project!

An example project that implements following packages in a ASP.NET 5 MQTT Broker/Server:

## Current Implemented Package Status:
- [**MQTTnet**](https://github.com/chkr1011/MQTTnet) - `v3.0.16` - Working
- [**MQTTnet - AspNetCore - AttributeRouting**](https://github.com/Atlas-LiftTech/MQTTnet.AspNetCore.AttributeRouting) - `v3.0.16` *(Forked, see [NuGet](https://www.nuget.org/packages/MQTTnet.AspNetCore.AttributeRouting.Forked/))* - Working
- [**Saunter**](https://github.com/tehmantra/saunter) - `v0.4.0` - Working *(Newer versions will break documentation generation)*

## Some Notes:
- Tested with [**MQTTnet.App**](https://github.com/chkr1011/MQTTnet.App) as the client, configured as following:
- Transport protocol: `WebSocket`
- TLS version: `no TLS`
- Host: `localhost:5000/mqtt`
- Port: `5000`
- A [**CatchAllController**](https://github.com/Rikj000/Saunter-MQTTnet-AspNet5-AttributeRouting-ExampleProject/blob/main/Saunter-MQTTnet-AspNet5-AttributeRouting-ExampleProject/Controllers/Mqtt/CatchAllController.cs) has been implemented, this will log all MQTT related messages going in/out of the MQTTnet Broker/Server
- A (MQTT) [**ExampleController**](https://github.com/Rikj000/Saunter-MQTTnet-AspNet5-AttributeRouting-ExampleProject/blob/main/Saunter-MQTTnet-AspNet5-AttributeRouting-ExampleProject/Controllers/Mqtt/ExampleController.cs) has been implemented with following **Publish Topics**:
- `ExampleController/publish//temperature`
- PostalCode: `90210`
- Payload: `int`
- `ExampleController/publish/test`
- Payload: `byte`
- The [**MqttService**](https://github.com/Rikj000/Saunter-MQTTnet-AspNet5-AttributeRouting-ExampleProject/blob/main/Saunter-MQTTnet-AspNet5-AttributeRouting-ExampleProject/Services/MqttService.cs) has been implemented with following **Subscribe Topic**:
- `MqttService/subscribe/kiss`
- It will send a Payload every `KissIntervalSeconds` *(Configurable in `appsettings.json`)* for as long as there are clients connected.
- Payload: `$"MQTTnet hosted on {frameworkName} is still running at {DateTime.Now}!"`
- Here you can also configure various MQTT Broker related settings / handlers
- [**Startup**](https://github.com/Rikj000/Saunter-MQTTnet-AspNet5-AttributeRouting-ExampleProject/blob/main/Saunter-MQTTnet-AspNet5-AttributeRouting-ExampleProject/Startup.cs) is where most of the other Package configuration happens