0
0
IOT Protocolsdevops~20 mins

Topic design patterns for IoT in IOT Protocols - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
IoT Topic Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Publish-Subscribe Pattern in IoT

Which statement best describes the publish-subscribe pattern commonly used in IoT messaging?

ADevices publish messages to a broker, and subscribers receive messages from the broker.
BDevices store messages locally and share them when requested.
CDevices send messages directly to each other without a broker.
DDevices use a centralized database to read and write messages synchronously.
Attempts:
2 left
💡 Hint

Think about how messages flow through a middleman in this pattern.

💻 Command Output
intermediate
2:00remaining
MQTT Topic Wildcard Matching Output

Given an MQTT broker subscription to the topic home/+/temperature, which published topic will NOT match this subscription?

Ahome/livingroom/temperature
Bhome/livingroom/humidity
Chome/kitchen/temperature
Dhome/bedroom/temperature
Attempts:
2 left
💡 Hint

The + wildcard matches exactly one level in the topic hierarchy.

Configuration
advanced
2:00remaining
Configuring Retained Messages in MQTT

Which MQTT client configuration will ensure that the last message published on a topic is stored by the broker and sent immediately to new subscribers?

ASubscribe with the clean session flag set to true.
BSubscribe with QoS level 0.
CPublish messages with QoS level 2 only.
DPublish messages with the retain flag set to true.
Attempts:
2 left
💡 Hint

Consider how the broker knows to keep the last message for a topic.

Troubleshoot
advanced
2:00remaining
Troubleshooting MQTT Topic Subscription Issues

An IoT device subscribes to the topic devices/+/status but does not receive messages published to devices/device1/status. What is the most likely cause?

AThe broker does not support wildcard subscriptions.
BThe subscription used the wildcard <code>#</code> instead of <code>+</code>.
CThe device subscribed with a clean session flag set to false.
DThe device published messages with QoS 0 instead of QoS 1.
Attempts:
2 left
💡 Hint

Think about broker capabilities and wildcard support.

🔀 Workflow
expert
3:00remaining
Designing a Scalable IoT Topic Hierarchy

You need to design an MQTT topic hierarchy for a smart city project with thousands of sensors across multiple districts and sensor types. Which topic design pattern will best support scalability and easy filtering?

AUse a single topic for all sensors, like <code>all_sensors</code>.
BUse a flat topic structure with sensor IDs only, like <code>sensor123</code>.
CUse a hierarchical topic structure like <code>city/district/sensor_type/sensor_id</code>.
DUse random topic names generated at runtime for each sensor.
Attempts:
2 left
💡 Hint

Think about how to organize topics for filtering by location and type.