0
0
IOT Protocolsdevops~20 mins

QoS levels (0, 1, 2) in IOT Protocols - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
MQTT QoS Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding QoS 0 in MQTT

What is the main characteristic of QoS level 0 in MQTT?

AThe message is stored on the broker until the subscriber is online.
BThe message is delivered at most once, with no confirmation.
CThe message is delivered exactly once, using a four-step handshake.
DThe message is delivered at least once, with confirmation required.
Attempts:
2 left
💡 Hint

Think about the simplest delivery method without retries.

🧠 Conceptual
intermediate
1:30remaining
Behavior of QoS 1 in MQTT

Which statement best describes QoS level 1 in MQTT?

AMessages are delivered at least once, with acknowledgment required.
BMessages are delivered exactly once with a two-step handshake.
CMessages are delivered at most once without acknowledgment.
DMessages are queued indefinitely on the broker.
Attempts:
2 left
💡 Hint

Consider the delivery guarantee that ensures the message arrives but may duplicate.

🧠 Conceptual
advanced
2:00remaining
Exact Delivery Guarantee of QoS 2

What mechanism does QoS level 2 use to ensure messages are delivered exactly once?

AA single acknowledgment from the receiver after message receipt.
BA simple send and forget approach with no handshake.
CA four-step handshake involving message exchange and release confirmation.
DStoring messages on the client until the broker confirms delivery.
Attempts:
2 left
💡 Hint

Think about a multi-step process that avoids duplicates.

💻 Command Output
advanced
2:00remaining
Output of MQTT QoS 1 Message Flow

Given the following MQTT client log snippet for a QoS 1 message, what is the final status?

IOT Protocols
Client sends PUBLISH message with packet ID 10
Broker responds with PUBACK for packet ID 10
Client logs: 'Message 10 delivered successfully'
AMessage delivery failed due to missing PUBREC.
BMessage was delivered exactly once using four-step handshake.
CMessage was delivered at most once, no confirmation.
DMessage was delivered at least once, confirmed by PUBACK.
Attempts:
2 left
💡 Hint

Look at the acknowledgment type and packet ID matching.

Troubleshoot
expert
2:30remaining
Troubleshooting Duplicate Messages in QoS 1

A subscriber using QoS 1 receives duplicate messages. What is the most likely cause?

AThe subscriber is not sending PUBACK, causing the broker to resend messages.
BThe broker is using QoS 0, which does not guarantee delivery.
CThe subscriber is using QoS 2, which duplicates messages by design.
DThe network is dropping PUBREL packets, causing duplicates.
Attempts:
2 left
💡 Hint

Consider what happens if acknowledgments are missing in QoS 1.