Posts

Showing posts with the label mqtt

PublishAsync does not fail when MQTTnet server is not running

PublishAsync does not fail when MQTTnet server is not running I am using MQTTNet, a .NET library for MQTT based communication from below link https://github.com/chkr1011/MQTTnet I am using managed MQTT Client from below link managed MQTT Client https://github.com/chkr1011/MQTTnet/wiki/ManagedClient I have below code to publish messages to MQTT server . publish MQTT server var messagePayload = new MqttApplicationMessageBuilder() .WithTopic("Topic1") .WithPayload(message) .WithExactlyOnceQoS() .WithRetainFlag() .Build(); try { await mqttClient.PublishAsync(messagePayload); } catch (Exception ex) { //Why I am not getting exception? } 1 Answer 1 ...

Azure topic and sending message over MQTT

Image
Azure topic and sending message over MQTT Is it possible to send messages to azure to any custom topic via mqtt. All example that I've found so far work with standard topics 'devices/' + hubName + '/messages/events/' 'devices/' + hubName + '/messages/devicebound/#' Btw, I tried to send/subscribe on the topic/subscription above with MQTT.fx application and never received messages, although the connection was successful. What did you mean about 'never received messages'? Did it mean that the back end can not receive the messages which sent from MQTT.fx(Device-To-Cloud), or MQTT.fx can not receive the messages which sent from service(Cloud-To-Device)? – Michael Xu - MSFT Jul 2 at 6:11 MQTT.fx being subscribed on devices/mydevice/messages/devicebound/#, never received messa...