Skip to content

.NET nanoFramework demonstration as a client for Azure EventGrid Namespace MQTT support

License

Notifications You must be signed in to change notification settings

sandervandevelde/Nanoframework-Cloud-MQTT-Broker-support

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET nanoFramework app with Azure EventGrid Namespace MQTT support

This .NET nanoFramework demonstration app acts like a client for Azure EventGrid support for MQTT.

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
  • Last will and testament support

If everything is set up correctly and rolled out on a constrained device like an ESP32, you get a flow like this:

image

Read the full story in this blog post.

Certificates

You need three certificates to both secure the TLS communication and to prove the identity:

  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

An introduction to 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

.NET nanoFramework demonstration as a client for Azure EventGrid Namespace MQTT support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages