title: Understanding mqtt subscriber qos
body: <p>I am new to MQTT and I just learned about the meaning of the QOS level that is decided when a message is published: </p>
  
  <ul>
  <li><strong>0</strong> when we prefer that the message will not arrive at all rather than arrive twice</li>
  <li><strong>1</strong> when we want the message to arrive at least once but don't care if it arrives twice (or more)</li>
  <li><strong>2</strong> when we want the message to arrive exactly once.
  A higher QOS value means a slower transfer</li>
  </ul>
  
  <p>I noticed that the subscriber side can also set the "<em>Maximum QOS level they will receive</em>".
  Quoting from <a href="http://bb-smartsensing.com/basics-of-mqtt" rel="noreferrer">here</a>:</p>
  
  <blockquote>
    <p>For example, if a message is published at QoS 2 and a client is subscribed with QoS 0, the message will be delivered to that client with QoS 0.</p>
  </blockquote>
  
  <p>Does this mean that the message might not arrive to the client (QOS 0) despite the fact that publisher sent it with QOS 2?</p>
  
  <p>This might be a big issue among inexperienced developers - for example, the default QOS of the subscribe function in the <a href="https://www.npmjs.com/package/mqtt#subscribe" rel="noreferrer">npm mqtt package</a> is 0! (The default should have been the maximum value 2 in my opinion, i.e. "let the publisher decide the QOS").</p>