QOS2 Messages from mosquitto_pub aren't sent out

Bug #537061 reported by Ben Tobin
6
This bug affects 1 person
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)

Revision history for this message
Ben Tobin (tbone-drclabs) wrote :

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.

Revision history for this message
Roger Light (roger.light) wrote :

Ah yes, that looks as though it is just mosquitto_pub that is at fault here.

Thanks for the report!

Changed in mosquitto:
assignee: nobody → Roger Light (roger.light)
milestone: none → 0.5.4
status: New → Confirmed
Changed in mosquitto:
status: Confirmed → Fix Committed
Changed in mosquitto:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.