pythonmqttiotbrokerpublisher

How to remove a published topic


I am new to MQTT protocol. As I read through the document, I couldn't see any function to remove the published topic. My purpose is to allow the publisher to remove the published topic. Did I miss something in the mqtt document? Any suggestion? Thanks !


Solution

  • There is no concept of removing a topic.

    If the publisher stops publishing data on a topic the subscribers will stop receiving data on that topic but there is nothing to remove. A subscriber can subscribe to a topic that no messages have ever been published on and that is fine, the broker will send then any messages that may be sent in the future.

    Pub/sub messaging topics are not like message queues that need to be defined up front