Skip to content

MQTT v5: outbound QoS 1/2 deliveries ignore the client's Receive Maximum #3281

Open

Description

@kriszyp

A v5 client can advertise a Receive Maximum in CONNECT: the most QoS 1 and QoS 2 PUBLISHes it will accept unacknowledged. Harper ignores it for outbound deliveries and only slows a subscriber once more than 100 are pending (AWAITING_ACKS_HIGH_WATER_MARK in server/DurableSubscriptionsSession.ts). A client that advertises fewer, say 10, receives more than 10 in flight, which violates MQTT-3.3.4-9; a strict client may disconnect with 0x93.

main behaves the same for QoS 1. #3263 added the server-side Receive Maximum for inbound QoS 2 but not this direction. Possible direction: read properties.receiveMaximum from CONNECT and hold back deliveries while that many await PUBACK/PUBREC.

Review-Deferral: d12715e3cabf1c23 severity=minor category=correctness

🤖 Generated by Claude (Anthropic Claude Code, Opus 5.5); posted via @kriszyp.

Activity

  1. added theissue type on Oct 19, 2026
  2. maurice-harper commented on Nov 10, 2026

    @maurice-harper
    Contributor

    Reproduced on harper-pro 5.4.0-beta.2, on a single node and on a 2-region cluster.

    A packet-level MQTT v5 client connects with receiveMaximum: 2, subscribes to a table topic at QoS 1, and never sends PUBACK. Ten QoS 1 messages are then published to that topic. The server sends all 10 PUBLISHes without waiting for an acknowledgement, where [MQTT-3.3.4-9] allows 2. The result is the same on both setups.

    The AWAITING_ACKS_HIGH_WATER_MARK slowdown only starts after 100 pending deliveries. For a clean-session QoS 1 subscription, deliveries without an upstream acknowledge aren't tracked in awaitingAcks at all, so nothing counts against the client's limit.

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

    area:MQTTMQTT protocol support

    Type

    Fields

    Priority

    P3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions