rumqtt
rumqtt copied to clipboard
fix(rumqttd): handle subscription qos as max qos
when we subscribe to a filter ( in v3.11 / v5 ), we specify the qos, which is maximum qos , but we treat is as the qos for all publishes. to clarify, standards mention:
If a subscribing Client has been granted maximum QoS 1 for a particular Topic Filter, then a QoS 0 Application Message matching the filter is delivered to the Client at QoS 0.
i.e. if we have A subscribing to a topic with qos2, and them B publish 3 messages ( with qos 0, 1 & 2 ) to that topic. A should recv 3 messages, but with qos of 0, 1 and 2 respectively. Currently it recv all 3 with qos 2!
Type of change
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] Formatted with
cargo fmt - [x] Make an entry to
CHANGELOG.mdif it's relevant to the users of the library. If it's not relevant mention why.