You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mqtt-kafka: PUBACKs for pipelined QoS 1 PUBLISH packets are returned out of order #3102
When an MQTT client pipelines several QoS 1 PUBLISH packets without waiting for each PUBACK, Zilla (mqtt server over mqtt-kafka) returns the PUBACKs in a different order than the PUBLISH packets were received. Reproduced on a plain topic with no shared subscriptions. A client sending QoS 1 publishes with mosquitto_pub -l exits early and loses messages.
MQTT 5.0 requires PUBACKs in the order the PUBLISH packets were received ([MQTT-4.6.0-2]: a Server MUST send PUBACK packets in the order in which the corresponding PUBLISH packets were received).
Expected
PUBACKs (and PUBREC/PUBCOMP for QoS 2) are sent in the order of the corresponding PUBLISH (PUBREL) packets, per the ordering rules in MQTT 5.0 section 4.6.
To investigate
Where reordering originates: per-publish application streams completing independently in the mqtt server, or the Kafka produce path in mqtt-kafka acknowledging out of order.
Add a spec/IT with pipelined QoS 1 publishes whose application acknowledgements complete out of order, and assert PUBACK order (test-first). Consider the same for QoS 2 PUBREC/PUBCOMP.
Activity
fix(binding-mqtt): send PUBACK and PUBREC in publish receive order
fix(binding-mqtt): send PUBACK and PUBREC in publish receive order (a…