MQTT mosquitto.conf 參數說明
Mosquitto MQTT 安裝 2016年8月17日 Tags : Ubuntu Mosquitto MQTT MQTT 的全名為 Message Queuing Telemetry Transport,為 IBM 和 Eurotech 共同製定出來的協定,MQTT 是為了物聯網設計的協定,透過Publish/Subscribe 的方式來做訊息傳送。 Publish/Subscribe 有三種主要的組成元件,分別為Publisher、Subscriber 以及 Topic。 mosquitto 為 Eclipse 所開發的開源 MQTT broker 和給用戶端使用C語言的API介面,目前最新版本為 V1.4.9。 Prerequisites sudo wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key sudo apt-key add mosquitto-repo.gpg.key cd /etc/apt/sources.list.d/ sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list sudo apt-get update Install Mosquitto Broker sudo apt-get install mosquitto Install Mosquitto Client sudo apt-get install mosquitto-clients 測試 開啟兩個終端機分別輸入 終端機1(Subscribe) mosquitto_sub -d -t hello/world -d :debug 模式 , -t :訂閱的主題名稱 , -h :Broker's IP , -p :Broker's port 終端機2(Publish) mosquitto_pub -d -t hello/world -m "Hello from Terminal window 2!" -m :發送的文字內容 當兩個command line 都輸入完後終端機分別會看到 終端機1(Subscribe) Client mosqsub/83-MQTT1 sending CONNECT Clie