Skip to content

mqtt_disconnect

sanshengshui edited this page Oct 7, 2023 · 2 revisions

Disconnects a previously connected client.

clientId@host:port > disconnect

Alias:clientId@host:port > dis

Example

Connect a client which is identified by test mosquitto client1 and disconnect it afterward using default settings

Press Ctrl+C or `exit` to exit the REPL
used: 🔴  unused: 🟢

🟢 0: test mosquitto client1@test.mosquitto.org:1883
🟢 1: test mosquitto client2@test.mosquitto.org:1883
new > add a new config settings
Please select your mqtt configs: > 0
you typed:0
clientId:toolkit_mqtt_foRbI6r1 connect broker test.mosquitto.org:1883😄

Usage: > { pub | sub | unsub | dis | list | exit }

In context mode all MQTT commands relate to the currently active client.

commands:
  help                Displays help information about the specified command
  pub, publish        Publish a message to a list of topics
  sub, subscribe      Subscribe this MQTT client to a list of topics
  unsub, unsubscribe  Unsubscribe this MQTT client from a list of topics
  dis, disconnect     Disconnects this MQTT client
  ls, list            List connected client info and subscribed topics
  exit                Exit the current context

test mosquitto client1@test.mosquitto.org:1883 > dis
clientId:toolkit_mqtt_foRbI6r1 close!

toolkit-config


toolkit-MQTT

  • toolkit mqtt desc: introduction and description of MQTT protocol;
  • toolkit mqtt set: mqtt settings information management;
  • toolkit mqtt shell: mqtt shell mode;

toolkit-CoAP

Synopsis:

  • toolkit coap desc: introduction and description of CoAP protocol;

  • toolkit coap mt: List supported MIME types;

  • toolkit coap disc: list available resources;

  • toolkit coap get: Request data from CoAP Resource;

  • toolkit coap post: Create/Update data in CoAP Resource;

  • toolkit coap put: Update data in CoAP Resource;

  • toolkit coap del: Delete CoAP Resource;


toolkit-NBIOT

NB-IoT


Test

Clone this wiki locally