Recall & Review
beginner
What does the '+' wildcard represent in MQTT topic subscriptions?
The '+' wildcard matches exactly one level in the topic hierarchy. It acts like a placeholder for any single topic name at that level.
Click to reveal answer
beginner
What does the '#' wildcard represent in MQTT topic subscriptions?
The '#' wildcard matches any number of levels, including zero, in the topic hierarchy. It must be the last character in the subscription.
Click to reveal answer
beginner
How would you subscribe to all topics under 'home/kitchen' using wildcards?
Use the subscription 'home/kitchen/#' to receive messages from 'home/kitchen' and all its subtopics.
Click to reveal answer
intermediate
Can the '+' wildcard be used multiple times in a single MQTT subscription?
Yes, '+' can be used multiple times to match one level at each position in the topic hierarchy.
Click to reveal answer
intermediate
Why must the '#' wildcard be the last character in an MQTT subscription?
Because '#' matches all remaining levels, placing it last ensures the subscription covers all subtopics beyond that point without ambiguity.
Click to reveal answer
What does the MQTT subscription 'home/+/temperature' match?
✗ Incorrect
The '+' wildcard matches exactly one level, so 'home/+/temperature' matches topics like 'home/kitchen/temperature' or 'home/livingroom/temperature'.
Which MQTT subscription matches all topics under 'office' including sublevels?
✗ Incorrect
'office/#' matches 'office' and all its subtopics at any level.
Is 'home/#/temperature' a valid MQTT subscription?
✗ Incorrect
The '#' wildcard must be the last character in the subscription.
What does the subscription '+/sensor/#' match?
✗ Incorrect
'+' matches one level, so the first level can be anything, then 'sensor', then any subtopics with '#'.
Which wildcard matches exactly one topic level in MQTT?
✗ Incorrect
'+' matches exactly one level; '#' matches multiple levels; '*' and '?' are not MQTT wildcards.
Explain how the '+' and '#' wildcards work in MQTT topic subscriptions and give an example of each.
Think about how you can listen to specific or broad topic patterns.
You got /3 concepts.
Describe why the '#' wildcard must be the last character in an MQTT subscription and what happens if it is not.
Consider how MQTT interprets topic hierarchies.
You got /3 concepts.