Reputation: 43
MQTT's qos about subscribe and pubulic qos mean when client receive or send message, the service qu.
But the Will QOS mean what?
I know the Will is when the client is abnormal disconnct the Will going to be send to client.
No matter the Will QoS is set to 0 / 1 / 2, it will not affect the accessibility of the connect message between the publisher and the server. The QoS of subscribers subscribing to topic is the QoS between subscribers and servers, which has nothing to do with Will QoS
Upvotes: 0
Views: 575
Reputation: 1324
LastWillQoS can be set differently from message QoS.
For example, your application can use QoS=0 for message delivery, but use LastWillQoS=2 to notify subscribers if the publisher is in abnormal condition.
Please refer to here for more information.
from your comments, I realized your actual question comes from the misunderstanding of QoS concept, which is basically an agreement of both publisher and subscriber sides (in your case, broker and subscriber) about the message delivery service quality. In principle, both sides can ask for needed QoS, but the lower one is used for actual message delivery.
In your case, broker has asked for QoS2 for delivery of will message according to your publisher's setting, but to actually deliver the will message by QoS2, your subscriber will also need to ask for QoS2, so that QoS2 agreement can be established.
Added one reference here.
Upvotes: 2