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 v5: honor client-advertised maximum payload size #834
MQTT v5 allows clients to advertise their maximum packet size in the CONNECT packet. Harper should honor this limit and reject PUBLISH packets exceeding the client's declared maximum.
Reproduced on harper-pro 5.4.0-beta.2, on a single node and on a 2-region cluster. This is the outbound direction: the server sending more than the client advertised.
A packet-level MQTT v5 client connects with maximumPacketSize: 120 and subscribes at QoS 0. A small message is published, then one with a ~500-byte value. The client receives both, and the second PUBLISH is 531 bytes. [MQTT-3.1.2-24] says the server must not send a packet over the client's maximum, and [MQTT-3.1.2-25] says it should discard the message and behave as if it was sent.
maximumPacketSize is read from CONNECT, but today it's only applied to the reason string on SUBACK and on acks. It isn't applied to PUBLISH.
Activity
maurice-harper commentedon Nov 10, 2026
Reproduced on harper-pro 5.4.0-beta.2, on a single node and on a 2-region cluster. This is the outbound direction: the server sending more than the client advertised.
A packet-level MQTT v5 client connects with
maximumPacketSize: 120and subscribes at QoS 0. A small message is published, then one with a ~500-byte value. The client receives both, and the second PUBLISH is 531 bytes. [MQTT-3.1.2-24] says the server must not send a packet over the client's maximum, and [MQTT-3.1.2-25] says it should discard the message and behave as if it was sent.maximumPacketSizeis read from CONNECT, but today it's only applied to the reason string on SUBACK and on acks. It isn't applied to PUBLISH.