Great tutorial on using M2Mqtt client library and GnatMQ broker with .Net Gadgeteer by Microsoft MVP Blake McNeill (@mcneillb). He posted all the materials on GHI community web site and the video on his YouTube channel.
As he said on GHI web site …
This example uses 2 Gadgeteer devices, one acting as a controller and the other as a controlled device to demonstrate using MQTT (popular light weight messaging protocol used in IoT). The devices use @ppatierno open source M2Mqtt library which makes using MQTT easy with Gadgeteer. The devices have various controls to explore the different features of MQTT, such as Publishing/Subscribing to Topics, QoS Levels, Retained Messages, Sessions and Last Will.
I have used this demo against a number of different MQTT Brokers including Mosquitto, HiveMQ and @ppatierno GnatMQ (which I had installed on Azure according to his instructions here http://www.embedded101.com/Blogs/PaoloPatierno/tabid/106/entryid/455/GnatMQ-in-the-Cloud-an-MQTT-broker-on-Microsoft-Azure.aspx )
- M2Mqtt – https://m2mqtt.wordpress.com
- MosquittoTest Broker – test.mosquitto.org
- TT3 MQTT Windows Client – https://github.com/francoisvdm/TT3
- GHI Electronics – https://www.ghielectronics.com/catalog/category/265
- RGB Pixel Modules – https://www.ghielectronics.com/community/creations/entry/8
- Glide Designer – https://www.ghielectronics.com/glide/designer
- MQTT Site – http://mqtt.org