-
-
Save mgwedd/12d0bb571c7042fa1873f8b1ad61286f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C# .Net | |
client.UseApplicationMessageReceivedHandler(e => | |
{ | |
Console.WriteLine("### RECEIVED APPLICATION MESSAGE ###"); | |
Console.WriteLine($"+ Topic = {e.ApplicationMessage.Topic}"); | |
Console.WriteLine($"+ Payload = {Encoding.UTF8.GetString(e.ApplicationMessage.Payload)}"); | |
Console.WriteLine($"+ QoS = {e.ApplicationMessage.QualityOfServiceLevel}"); | |
Console.WriteLine($"+ Retain = {e.ApplicationMessage.Retain}"); | |
Console.WriteLine(); | |
Task.Run(() => client.PublishAsync("hello/world")); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment