Link Search Menu Expand Document Edit GitHub

Unsubscribe


Unsubscribes the currently active context client from a list of topics and is therefore only available in Shell mode.

client@host> unsubscribe

Alias: client@host> unsub


Options

OptionLong VersionExplanation
-t--topicA topic from which the client will unsubscribe from.
-up--userPropertyA user property of the unsubscribe message.

Help Options

OptionLong VersionExplanation
-h--helpDisplay help message for command.
-V--versionDisplay version information of the cli.

Example

Connect a client which is identified by myClient and subscribe it to two topics afterward. Then unsubscribe from one of the two topics:

mqtt> con -i myClient
myClient@localhost> sub -t topic1 -t topic2
myClient@localhost> unsub -t topic1
mqtt>