rumqtt icon indicating copy to clipboard operation
rumqtt copied to clipboard

fix(rumqttd): handle subscription qos as max qos

Open swanandx opened this issue 2 years ago • 0 comments

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.md if it's relevant to the users of the library. If it's not relevant mention why.

swanandx avatar Sep 04 '23 15:09 swanandx