Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/rikj000/saunter-mqttnet-aspnet5-attributerouting-exampleproject
- Owner: Rikj000
- License: mit
- Created: 2021-07-20T11:48:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-11T14:12:37.000Z (over 1 year ago)
- Last Synced: 2024-07-29T16:59:29.959Z (3 months ago)
- Topics: asp-net-5, asyncapi, mqtt, mqtt-broker, mqttnet, saunter
- Language: C#
- Homepage:
- Size: 76.2 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Saunter MQTTnet AspNet5 AttributeRouting ExampleProject
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