
Sumatif Assesment: Wildcard, QoS, Retain in MQTT Protocol
Authored by Zuly Irawan
Computers
11th Grade
Used 8+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
A smart building uses the topic structure building/floor/room/sensor (e.g., building/5/conference_room/temperature). A client needs to subscribe to only the 'temperature' sensor data from all rooms on the 5th floor. Which topic subscription should it use?
building/5/room/temperature
building/5/#
building/5/+/temperature
building/+/+/temperature
Answer explanation
This correctly uses the single-level wildcard + to match any room, but specifically on floor 5 and for the 'temperature' sensor.
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
A home automation system publishes data under topics like home/garage/door/status and home/garage/temp. What subscription is required to receive all messages published under the 'garage' category, regardless of how many sub-levels there are?
home/garage/+/+
home/garage/*
home/garage/+
home/garage/#
Answer explanation
This correctly uses the multi-level wildcard # to match all topics that begin with home/garage/, including all sub-levels.
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
A developer tries to subscribe to factory/#/status to get all status messages (e.g., factory/line1/status and factory/line2/machineA/status). Why will this subscription fail?
The topic filter is too long for the broker.
The # wildcard must be the last character in the topic subscription.
Wildcards cannot be combined with specific topic names.
The + wildcard should be used instead of #.
Answer explanation
This is the correct reason. A topic like factory/#/status is invalid because # must only appear at the very end of the subscription string.
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
An application publishes ambient temperature data from 1,000 sensors every 10 seconds. This data is for a non-critical dashboard, and occasional missed messages are acceptable. Which QoS level is most appropriate?
QoS 3 (This level does not exist)
QoS 2 (Exactly once)
QoS 1 (At least once)
QoS 0 (At most once)
Answer explanation
This is the best choice. It has the lowest overhead ('fire and forget') and is suitable for high-frequency, non-critical data where losing a message is acceptable.
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
A financial app uses MQTT to process a 'transfer funds' instruction. It is critical that the instruction is processed exactly once. A duplicate instruction would cause a double transfer. Which QoS level is required?
QoS 2
QoS 0
.
QoS 1
Answer explanation
This is the correct choice. Its 4-part handshake ensures the message is delivered and processed by the recipient exactly one time, preventing both loss and duplication.
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
A mobile app sends a command to unlock a smart door. It is critical that the door receives the command. However, the door's software is idempotent (it can safely ignore a second 'unlock' command if it receives it twice). What is the minimum sufficient QoS level?
QoS 2
QoS 0
QoS 0 or QoS 1
QoS 1
Answer explanation
This guarantees 'at least once' delivery. Since the door can handle duplicates, this is the minimum sufficient level to ensure the command arrives.
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
A new smart thermostat connects to the network and subscribes to home/thermostat/setting. It needs to know the last set temperature immediately, without waiting for a new publish. Which MQTT feature should be used?
A Persistent Session
QoS 2 Publishing
A wildcard subscription
The RETAIN flag on the message
Answer explanation
Correct. When a message is published with the RETAIN flag, the broker stores it and delivers it instantly to any new client that subscribes to that topic.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?