An example project that implements following packages in a ASP.NET 5 MQTT Broker/Server:
- MQTTnet -
v3.0.16- Working - MQTTnet - AspNetCore - AttributeRouting -
v3.0.16(Forked, see NuGet) - Working - Saunter -
v0.4.0- Working (Newer versions will break documentation generation)
- Tested with MQTTnet.App as the client, configured as following:
- Transport protocol:
WebSocket - TLS version:
no TLS - Host:
localhost:5000/mqtt - Port:
5000
- Transport protocol:
- A CatchAllController has been implemented, this will log all MQTT related messages going in/out of the MQTTnet Broker/Server
- A (MQTT) ExampleController has been implemented with following Publish Topics:
ExampleController/publish/<PostalCode>/temperature- PostalCode:
90210 - Payload:
int
- PostalCode:
ExampleController/publish/test- Payload:
byte
- Payload:
- The MqttService has been implemented with following Subscribe Topic:
MqttService/subscribe/kiss- It will send a Payload every
KissIntervalSeconds(Configurable inappsettings.json) for as long as there are clients connected. - Payload:
$"MQTTnet hosted on {frameworkName} is still running at {DateTime.Now}!"
- It will send a Payload every
- Here you can also configure various MQTT Broker related settings / handlers
- Startup is where most of the other Package configuration happens