eclipse / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.1k stars 880 forks source link

Subscribe with nolocal and shared subscription #977

Open freyssin opened 1 year ago

freyssin commented 1 year ago

The MQTT v5 specification disallows subscribing to shared subscriptions with the No Local option, ant it defines this as a Protocol Error. As defined in the section 4.13.1 of the specification, to be compliant with the specification a client must not send packets that may cause Protocol Errors. The client should therefore test this case before sending the packet to the server, which is then forced to close the connection.