In my understanding, in MQTT a topic is created once a client publishes something with the corresponding topic name.
There is no need to configure a topic, publishing on it is enough.
It is possible for a client to subscribe to its own topic, after it published, created it? I could not find any restrictions on it in the specifications. It is not listed as possible abnormal behaviour neither:
5.4.8 Detecting abnormal behaviors
Server implementations might monitor Client behavior to detect potential security incidents. For example:
- Repeated connection attempts
- Repeated authentication attempts
- Abnormal termination of connections
- Topic scanning (attempts to send or subscribe to many topics)
- Sending undeliverable messages (no subscribers to the topics)
- Clients that connect but do not send data
Based on this, I think it is certainly possible. So I am interested in what are the uses cases of this feature?
Why does the standard allow such mechanism, would it be to complicated to track the owner of the topics? So instead it just simply allows clients to subscribe to their own topic.
One use case I can think of is that this way a client can verify its published data.