LabVIEW-Open-Source/MQTT-Client

QoS2: No PUBCOMP packet is send from client

JohRup opened this issue · 4 comments

I am facing some problems using QoS 2. I adapted one of your templates for this purpose. The result looks not like it should look like. No PUBCOMP is send from the client to the broker. Attached is a detail of the command line of the broker (additional information: This broker is bridged with another broker from which data is received with QoS 2 as well).

After few to LabVIEW published packages (max_inflight_messages), no further packages are published. Connection remains stable.

1664285329: Received SUBSCRIBE from LabVIEW
1664285329: IMWind/ACC (QoS 2)
1664285329: LabVIEW 2 ACC
1664285329: Sending SUBACK to LabVIEW
1664285329: Received PUBLISH from WIND.bridge-01 (d0, q2, r0, m38661, 'ACC', ... (368 bytes))
1664285329: Sending PUBREC to WIND.bridge-01 (m38661, rc0)
1664285329: Received PUBREL from WIND.bridge-01 (Mid: 38660)
1664285329: Sending PUBLISH to LabVIEW (d0, q2, r0, m1, 'ACC', ... (367 bytes))
1664285329: Sending PUBCOMP to WIND.bridge-01 (m38660)
1664285329: Received PUBREC from LabVIEW (Mid: 1)
1664285329: Sending PUBREL to LabVIEW (m1)
1664285329: Received PUBREL from WIND.bridge-01 (Mid: 38661)
1664285329: Sending PUBLISH to LabVIEW (d0, q2, r0, m2, 'ACC', ... (368 bytes))
1664285329: Sending PUBCOMP to WIND.bridge-01 (m38661)
1664285329: Received PUBLISH from WIND.bridge-01 (d0, q2, r0, m38662, 'ACC', ... (365 bytes))
1664285329: Sending PUBREC to WIND.bridge-01 (m38662, rc0)
1664285329: Received PUBREC from LabVIEW (Mid: 2)
1664285329: Sending PUBREL to LabVIEW (m2)
1664285329: Received PUBLISH from WIND.bridge-01 (d0, q2, r0, m38663, 'ACC', ... (362 bytes))
1664285329: Sending PUBREC to WIND.bridge-01 (m38663, rc0)
1664285329: Received PUBREL from WIND.bridge-01 (Mid: 38662)
1664285329: Sending PUBLISH to LabVIEW (d0, q2, r0, m3, 'ACC', ... (365 bytes))
1664285329: Sending PUBCOMP to WIND.bridge-01 (m38662)
1664285329: Received PUBREC from LabVIEW (Mid: 3)
1664285329: Sending PUBREL to LabVIEW (m3)
1664285329: Received PUBREL from WIND.bridge-01 (Mid: 38663)
1664285329: Sending PUBLISH to LabVIEW (d0, q2, r0, m4, 'ACC', ... (362 bytes))
1664285329: Sending PUBCOMP to WIND.bridge-01 (m38663)
1664285329: Received PUBLISH from WIND.bridge-01 (d0, q2, r0, m38664, 'ACC', ... (364 bytes))
1664285329: Sending PUBREC to WIND.bridge-01 (m38664, rc0)
1664285329: Received PUBREC from LabVIEW (Mid: 4)
1664285329: Sending PUBREL to LabVIEW (m4)

Is there some mechanism I don't get right or is there any bug?

Are you talking about the client or the broker?
PUBCOMP is supposed to be sent from the broker.

image

Thanks for your quick reply. In my case, the broker publishes to the client (LabVIEW) as this broker is the bridge.

I extracted the relevant parts to make it clear:

1664285329: Sending PUBLISH to LabVIEW (d0, q2, r0, m1, 'ACC', ... (367 bytes))
1664285329: Received PUBREC from LabVIEW (Mid: 1)
1664285329: Sending PUBREL to LabVIEW (m1)
*missing PUBCOMP from LabVIEW client
1664285329: Sending PUBLISH to LabVIEW (d0, q2, r0, m2, 'ACC', ... (368 bytes))
1664285329: Received PUBREC from LabVIEW (Mid: 2)
1664285329: Sending PUBREL to LabVIEW (m2)
*missing PUBCOMP from LabVIEW client
1664285329: Sending PUBLISH to LabVIEW (d0, q2, r0, m3, 'ACC', ... (365 bytes))
1664285329: Received PUBREC from LabVIEW (Mid: 3)
1664285329: Sending PUBREL to LabVIEW (m3)
*missing PUBCOMP from LabVIEW client

I am seeing the same thing, there is a bug with subscribing with a QoS =2. To reproduce, set both publish and subscribe to Qos = 2 and publish data. After about 20 messages the user event from a publish does not happen anymore. the subscribe just stops for that topic, unsubscribe/subscribe does not fix or work after.

@jaddik, thanks for making this clear. I actually did not solve the problem so far and hope that your comment will lead to a solution.