Link Search Menu Expand Document Edit GitHub


Switches the currently active context client.

mqtt> switch


Parameter NameExplanationExamples
contextNameThe context name of a client consisting of the client identifier concatenated by a @ with the hostname. The hostname may be omitted and will be filled with the default host.myClient@localhost or simply the clientID (default @localhost will be added)


OptionLong VersionExplanationDefault
-i--identifierThe unique identifier of a client. 
-h--hostThe host the client is connected to.localhost

Help Options

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


Connect two clients and switch the active context to the first connected client

mqtt> con -i client1
client1@localhost> exit
mqtt> con -i client2 -h> switch client1
client1@localhost> switch>