QOS2 Messages from mosquitto_pub aren't sent out
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mosquitto |
Fix Released
|
Undecided
|
Roger Light |
Bug Description
Using the following command line, I try to send a QOS2 message. There are existing subscribers connected.
mosquitto_pub -h lyra -q 2 -r -m "New Message 7" -t "mytopic"
The subscribers do not get this message. However, QOS1 works fine.
Here's what it looks like in the debug log on the server:
Mar 10 18:50:58 lyra mosquitto[22265]: Received CONNECT from 76.74.154.25 as mosquitto_pub_22934
Mar 10 18:50:58 lyra mosquitto[22265]: Sending CONNACK to mosquitto_pub_22934 (0)
Mar 10 18:50:59 lyra mosquitto[22265]: Received PUBLISH from mosquitto_pub_22934
Mar 10 18:50:59 lyra mosquitto[22265]: Sending PUBREC to mosquitto_pub_22934 (Mid: 1)
Mar 10 18:50:59 lyra mosquitto[22265]: Received DISCONNECT from mosquitto_pub_22934
Here's what the log looks like if I use -q 1
Mar 10 18:56:03 lyra mosquitto[22265]: Received CONNECT from 76.74.154.25 as mosquitto_pub_27424
Mar 10 18:56:03 lyra mosquitto[22265]: Sending CONNACK to mosquitto_pub_27424 (0)
Mar 10 18:56:03 lyra mosquitto[22265]: Received PUBLISH from mosquitto_pub_27424
Mar 10 18:56:03 lyra mosquitto[22265]: Sending PUBACK to mosquitto_pub_27424 (Mid: 1)
Mar 10 18:56:03 lyra mosquitto[22265]: Sending PUBLISH to MQTT_Utility 3 (0, 1, 1, 2, 'mytopic', ... (13 bytes))
Mar 10 18:56:03 lyra mosquitto[22265]: Received DISCONNECT from mosquitto_pub_27424
Mar 10 18:56:03 lyra mosquitto[22265]: Received PUBACK from MQTT_Utility 3 (Mid: 2)
Changed in mosquitto: | |
status: | Confirmed → Fix Committed |
Changed in mosquitto: | |
status: | Fix Committed → Fix Released |
Oh, and here's what it looks like if I send a QOS2 message from the IBM sample java client:
Mar 10 18:58:12 lyra mosquitto[22265]: Received PUBLISH from MQTT_Utility
Mar 10 18:58:12 lyra mosquitto[22265]: Sending PUBREC to MQTT_Utility (Mid: 2)
Mar 10 18:58:13 lyra mosquitto[22265]: Received PUBREL from MQTT_Utility (Mid: 2)
Mar 10 18:58:13 lyra mosquitto[22265]: Sending PUBCOMP to MQTT_Utility (Mid: 2)
Mar 10 18:58:13 lyra mosquitto[22265]: Sending PUBLISH to MQTT_Utility 3 (0, 2, 1, 3, 'mytopic', ... (15 bytes))
Mar 10 18:58:13 lyra mosquitto[22265]: Received PUBREC from MQTT_Utility 3 (Mid: 3)
Mar 10 18:58:13 lyra mosquitto[22265]: Sending PUBREL to MQTT_Utility 3 (Mid: 3)
Mar 10 18:58:13 lyra mosquitto[22265]: Received PUBCOMP from MQTT_Utility 3 (Mid: 3)
That seems to work fine as well. So I think the problem lies in mosquitto_pub, and not in the mosquitto daemon.