.NET / C#


Emitter is an MQTT client tailored for emitter.io service, allowing real-time publish subscribe. It supports full .Net Framework, .Net Micro Framework and WinRT platform.

The current version supports several .Net Frameworks:

  • .Net Core
  • .Net Framework (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1)
  • .Net Micro Framework 4.2, 4.3 and 4.4
  • Mono (for Linux O.S.)

The current version also supports WinRT platforms:

  • Windows 8.1
  • Windows Phone 8.1
  • Windows 10

This library provides a nicer MQTT interface fine-tuned and extended with specific features provided by emitter.io. The library is based upon the M2MQTT library written by Paolo Patierno and released under Eclipse Public License.

Build Notes


To install Emitter, run the following command in the Package Manager Console:

Install-Package Emitter


Below is a sample program written using this C# client library. This demonstrates a simple console chat app where the messages are published to chat channel and every connected client receives them in real-time.

// Creating a connection to emitter.io service.
var emitter    = new Emitter.Connection();
var channelKey = "<channel key for 'chat' channel>";

// Connect to emitter.io service

// Handle chat messages
emitter.On(channelKey, "chat", (channel, msg) =>

// Publish messages to the 'chat' channel
string text = "";
Console.WriteLine("Type to chat or 'q' to exit...");
    text = Console.ReadLine();
    emitter.Publish(channelKey, "chat", text);
while (text != "q");

// Disconnect the client

To generate a channel key using the secret key provided, the GenerateKey method can be used.

// Generate a read-write key for our channel
    "<secret key>", 
    (response) => Console.WriteLine("Generated Key: " + response.Key)