Skip to content

mqtt-kafka: PUBACKs for pipelined QoS 1 PUBLISH packets are returned out of order #3102

Closed

Description

@jfallows

Problem

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

  1. added a commit that references this issue on Nov 17, 2026
    db26a59
  2. added a commit that references this issue on Nov 17, 2026
    3707898
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions