ruby-mqtt

Acknowledgement on publish - MQTT

a 夏天 提交于 2019-12-23 01:13:13
问题 How to identify whether the publish to a topic was success or not. Is there any way to get acknowledgement on publishing to a topic. If there is any connection loss during publish between the clients( Publisher/Subscriber) how to handle it. I don't want the subscriber to send an ack to specific topic in the publishing end after receiving the pay_load. Here is my ruby code: Assume, I have created clients (@client) and configured on both sides. Publish def publish_it @client.publish('test/hai',

Verify that local mosquitto MQTT Broker is bridged to test.mosquitto.org

北战南征 提交于 2019-12-12 02:54:30
问题 I have a local (OSX 11) mosquitto broker (1.4.7) running with the following config: connection test address test.mosquitto.org topic in_topic in 0 topic out_topic out 0 try_private false notifications false bridge_attempt_unsubscribe true I got the conf settings form here: bridge local mosquitto to cloud broker (thanks) I now have 3 terminals. A : subscribed to test.mosquitto.org directly using a ruby script and ruby-mqtt . B : subscribed to local broker with mosquitto_sub -t in_topic C :