Bird
Raised Fist0
IOT Protocolsdevops~5 mins

QoS levels (0, 1, 2) in IOT Protocols - Cheat Sheet & Quick Revision

Choose your learning style10 modes available
Recall & Review
beginner
What does QoS level 0 mean in MQTT?
QoS level 0 means "At most once" delivery. The message is sent once without confirmation. It may be lost if the network fails.
Click to reveal answer
beginner
Explain QoS level 1 in MQTT.
QoS level 1 means "At least once" delivery. The sender retries sending the message until it gets an acknowledgment, so duplicates may occur.
Click to reveal answer
intermediate
What is the guarantee provided by QoS level 2 in MQTT?
QoS level 2 guarantees "Exactly once" delivery. It uses a four-step handshake to ensure the message is received only once.
Click to reveal answer
beginner
Which QoS level is the fastest but least reliable?
QoS level 0 is the fastest because it sends messages without waiting for acknowledgment, but it is the least reliable.
Click to reveal answer
intermediate
Why might you choose QoS level 1 over QoS level 2?
QoS level 1 balances reliability and performance. It ensures messages arrive at least once but with less overhead than QoS 2, which is slower due to extra steps.
Click to reveal answer
Which QoS level in MQTT ensures a message is delivered exactly once?
AQoS 2
BQoS 0
CQoS 1
DQoS 3
What happens if a message sent with QoS 0 is lost?
AIt is resent until acknowledged
BIt is lost and not resent
CIt triggers an error
DIt is stored for later delivery
Which QoS level may cause duplicate messages to be received?
AQoS 1
BQoS 0
CQoS 2
DNone
Why is QoS 2 slower than QoS 1?
AIt uses encryption
BIt sends messages multiple times without confirmation
CIt requires multiple message exchanges for confirmation
DIt compresses messages
Which QoS level is best when message loss is acceptable?
AAll QoS levels guarantee no loss
BQoS 1
CQoS 2
DQoS 0
Describe the differences between QoS levels 0, 1, and 2 in MQTT.
Think about delivery guarantees and message confirmation steps.
You got /3 concepts.
    When would you choose each QoS level in a real IoT application?
    Consider speed, reliability, and resource use.
    You got /3 concepts.

      Practice

      (1/5)
      1. What does QoS level 0 mean in IoT messaging?
      easy
      A. The message is stored indefinitely until acknowledged.
      B. The message is delivered at least once, with confirmation.
      C. The message is delivered exactly once, with a handshake.
      D. The message is delivered at most once, with no confirmation.

      Solution

      1. Step 1: Understand QoS 0 delivery

        QoS 0 means the message is sent once without waiting for any acknowledgment.
      2. Step 2: Compare with other QoS levels

        QoS 1 and 2 involve confirmations; QoS 0 does not guarantee delivery.
      3. Final Answer:

        The message is delivered at most once, with no confirmation. -> Option D
      4. Quick Check:

        QoS 0 = no confirmation, at most once delivery [OK]
      Hint: QoS 0 means no delivery guarantee, just send once [OK]
      Common Mistakes:
      • Confusing QoS 0 with guaranteed delivery
      • Thinking QoS 0 waits for acknowledgment
      • Mixing QoS 0 with QoS 1 or 2 features
      2. Which QoS level requires a four-step handshake to ensure message delivery?
      easy
      A. QoS 0
      B. QoS 2
      C. QoS 1
      D. none of the above

      Solution

      1. Step 1: Recall handshake details for QoS levels

        QoS 2 uses a four-step handshake to guarantee exactly once delivery.
      2. Step 2: Differentiate from other QoS levels

        QoS 0 has no handshake; QoS 1 uses a simpler acknowledgment.
      3. Final Answer:

        QoS 2 -> Option B
      4. Quick Check:

        Four-step handshake = QoS 2 [OK]
      Hint: Four-step handshake means QoS 2 for exactly once delivery [OK]
      Common Mistakes:
      • Confusing QoS 1's single acknowledgment with four-step handshake
      • Assuming QoS 0 has any handshake
      • Choosing 'none of the above' incorrectly
      3. Given a device publishes a message with QoS 1, what is the expected behavior?
      medium
      A. The message is sent at least once, with acknowledgment.
      B. The message is sent once without acknowledgment.
      C. The message is sent exactly once, with a four-step handshake.
      D. The message is queued indefinitely until delivered.

      Solution

      1. Step 1: Understand QoS 1 delivery

        QoS 1 ensures the message is delivered at least once by requiring acknowledgment.
      2. Step 2: Compare with QoS 0 and 2

        QoS 0 sends once without acknowledgment; QoS 2 ensures exactly once with handshake.
      3. Final Answer:

        The message is sent at least once, with acknowledgment. -> Option A
      4. Quick Check:

        QoS 1 = at least once with ack [OK]
      Hint: QoS 1 means message sent at least once, confirmed by ack [OK]
      Common Mistakes:
      • Mixing QoS 1 with QoS 0's no acknowledgment
      • Confusing QoS 1 with QoS 2's exactly once guarantee
      • Assuming indefinite queuing for QoS 1
      4. A developer sets QoS 2 but notices duplicate messages received. What is the likely cause?
      medium
      A. The handshake process was interrupted or not completed.
      B. QoS 2 does not guarantee exactly once delivery.
      C. QoS 0 was actually set by mistake.
      D. The broker does not support QoS levels.

      Solution

      1. Step 1: Understand QoS 2 guarantees

        QoS 2 guarantees exactly once delivery only if handshake completes successfully.
      2. Step 2: Analyze duplicate message cause

        If handshake is interrupted, duplicates can occur due to retries.
      3. Final Answer:

        The handshake process was interrupted or not completed. -> Option A
      4. Quick Check:

        Incomplete handshake causes duplicates in QoS 2 [OK]
      Hint: Incomplete handshake causes duplicates in QoS 2 [OK]
      Common Mistakes:
      • Believing QoS 2 never allows duplicates
      • Assuming wrong QoS level was set without checking
      • Ignoring broker capabilities
      5. An IoT system must send critical sensor data exactly once without loss or duplication. Which QoS level should be used and why?
      hard
      A. QoS 0, because it is fastest and sufficient for critical data.
      B. QoS 1, because it guarantees delivery but may duplicate messages.
      C. QoS 2, because it guarantees exactly once delivery with handshake.
      D. None, critical data should be sent manually.

      Solution

      1. Step 1: Identify critical data requirements

        Critical data needs no loss and no duplication, so exactly once delivery is required.
      2. Step 2: Match QoS level to requirement

        QoS 2 provides exactly once delivery using a four-step handshake, ensuring no duplicates or loss.
      3. Final Answer:

        QoS 2, because it guarantees exactly once delivery with handshake. -> Option C
      4. Quick Check:

        Critical data needs QoS 2 for exactly once delivery [OK]
      Hint: Critical data needs QoS 2 for no loss or duplicates [OK]
      Common Mistakes:
      • Choosing QoS 0 for critical data due to speed
      • Confusing QoS 1's at least once with exactly once
      • Ignoring handshake importance
      Recommended

      Ready to prove it?

      Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

      10 questions~5 mineasy hard