Closed rwestergren closed 7 years ago
Why it doesn't work for me? I am using a emqtt broker. I wish to send command (publish) by Qos = 2.
This code tests fine using a demo broker. For example:
// Test Broker
$address = "broker.mqttdashboard.com";
$port = 1883;
$clientid = uniqid();
$mqtt = new phpMQTT($address, $port, $clientid);
$mqtt->connect();
$mqtt->publish("testtopic/1", "Test 123", 2);
$mqtt->close();
You may need to troubleshoot a raw packet capture - the issue is likely with your broker.
Sorry its taken so long to look at this, but I am back using MQTT now.
I am not going to merge this as its not really supporting QoS 2 as its not waiting for a PUBREC
before sending the PUBREL
but I will look into how I can have an 'Outbox' in phpMQTT to support QoS
Great point - this just fit a specific need for a project I was working on. Closed!
MQTT client QOS 2 flow requires: