Skip to content

sandervandevelde/Nanoframework-Cloud-MQTT-Broker-support

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

.NET nanoframework Cloud-MQTT-Broker-support

.NET nanoframework demonstration as a client for Azure EventGrid support for MQTT

Introduction

this Visual Studio project demonstrates how to connect to the EventGrid cloud MQTT broker for:

  • Connect
  • Send data to a topic
  • Receive data on a topic

If everything is set up correctly, you get a flow like:

image

Certificates

You need three certificates:

  1. The public TLS certificated for the connection to the broker based on DigiCert Global Root G3
  2. Private client certificate
  3. Public client certificate

Last will and testament

This new EventGrid namespace feature is now demonstrated too (you need to update your m2mqtt library if needed).

Notice the willRetain flag is set to false. That feature is not supported yet by the EventGrid namespace.

If the device connection is interrupted (eg. power is down) a message like this is shown:

image

Links

A demonstration of how to set up the MQTT Broker in Event Grid is seen here

Credits

This post from Roman Kiss helped me with the client credentials.

About

Nanoframework demonstration as a client for Azure EventGrid support for MQTT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages