When we analyzed the subscription operation, we learned that an MQTT client can subscribe to one or more topic filters. If we specify a topic name as a topic filter, we will only subscribe to a single topic. We can take advantage of the following two wildcards to create topic filters that subscribe to all the topics that match the filter:
- Plus sign (+): This is a single-level wildcard that matches any name for a specific topic level. We can use this wildcard instead of specifying a name for any topic level in the topic filter.
- Hash (#): This is a multilevel wildcard that we can use only at the end of a topic filter, as the last level, and it matches any topic whose first levels are the same as the topic levels specified at the left-hand side of the # symbol.
For example, if we want to receive all the messages related to altitude for all the drones...