AI, smart home more and more fire, in the process of communication between the server and multiple terminals using the traditional request/answer (Request/response) mode is obsolete, accompanied by a publish/subscribe (publish/ Subscribe) mode------The MQTT (Message Queuing Telemetry Transport) protocol. Because this article explains how to build an MQTT service on a Windows platform, you no longer state the pros and cons of Mqtt.
One, download and install the Apollo server
: http://activemq.apache.org/apollo/download.html
1. Download the Apolllo, then unzip it into a directory, go to the DOS window (CMD Command line window), switch to the Apollo directory, go to the Bin directory, and then run " apollo.cmd create mybroker
" to create the server instance.
2. After creating the instance, the Mybroker folder is generated in the Bin directory and enters the Mybroker directory (as shown below):
etc目录下的apollo.xml
File is the configuration server information file, the users.properties
file contains the connection to the MQTT server with the user name and password (need to remember), the initial default account is the admin, password password;
3. Use the MQTT service as a Windows service (install) and then start (start);
4. Verify that the installation is successful
Http://127.0.0.1:61680/console/index.html log in to the Background control page indicates successful installation
Ii. Use of Mqtt
After you have installed MQTT, you can use MQTT to communicate between devices that are based on subscription------publishing.
MQTT Server Setup (Windows platform)