An MQTT topic is a UTF-8 encoded string that is the basis for message routing in the MQTT protocol. A topic is typically leveled and separated with a slash / between the levels. This is similar to URL paths, for example:
Plain Text
chat/room/1
sensor/10/temperature
sensor/+/temperature
sensor/#
sensor/10/temperature
sensor/+/temperature
sensor/#
In comparison to topics in other messaging systems, for example, Kafka and Pulsar, MQTT topics are not to be created in advance. The client creates the topic when subscribing or publishing, and does not need to delete the topic.