You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ in JavaScript for node.js and the browser.
19
19
*[Command Line Tools](#cli)
20
20
*[API](#api)
21
21
*[Browser](#browser)
22
+
*[About QoS](#qos)
22
23
*[Contributing](#contributing)
23
24
*[License](#license)
24
25
@@ -450,6 +451,17 @@ you can then use mqtt.js in the browser with the same api than node's one.
450
451
451
452
Your broker should accept websocket connection (see [MQTT over Websockets](https://github.com/mcollina/mosca/wiki/MQTT-over-Websockets) to setup [Mosca](http://mcollina.github.io/mosca/)).
452
453
454
+
<aname="qos"></a>
455
+
## About QoS
456
+
457
+
Here is how QoS works:
458
+
459
+
* QoS 0 : received **at most once** : The packet is sent, and that's it. There is no validation about whether it has been received.
460
+
* QoS 1 : received **at least once** : The packet is sent and stored as long as the client has not received a confirmation from the server. MQTT ensures that it *will* be received, but there can be duplicates.
461
+
* QoS 2 : received **exactly once** : Same as QoS 1 but there is no duplicates.
462
+
463
+
About data consumption, obviously, QoS 2 > QoS 1 > QoS 0, if that's a concern to you.
0 commit comments