Mqtt is a one of the leading protocol in Internet of things. The Mqtt stands for Message Queuing telemetry transport. This protocol is based on PUB-SUB model. The Broker, Publisher and a subscriber are required for the communication. This protocol operates over Wi-Fi..
The Publisher client publishes the message over certain topic to the broker and this message can be received by any client subscriber which is subscribed to the broker over this topic. Thus publisher does not which client is receiving this message and the subscriber client does not know which publisher has transmitted the message. Mqtt is a lightweight protocol hence can be easily used by Constrained application based device where low memory is available like microcontrollers, Arduino, Raspberry pi etc,
Install Mosquitto Mqtt Broker on Windows based PC(mqtt server windows)
The Eclipse Mosquitto Mqtt Broker is a free mqtt broker it is also open source broker which is lightweight.It can be installed on windows mUbunu,mac,Debian etc based devices or Pcs.Visit the site of Eclipse Mosquitto mqtt download page and check out the suitable setup file for your os.
As we are interested in windows based setup file select one as per your pcs configuration and download it. After downloading click on the setup file and then installation starts for Mqtt Broker.
Click on Next
Select Destination Folder and click on next. I have selected destination folder as E:\mosquittobroker
Then we get setup complete window. Click on Finish. So Mosquitto Mqtt Broker is installed on your PC.
Now visit the destination folder where the mosquitto mqtt broker is installed. The folder looks like as below.
Check these files as given below.
mosquitto.conf: In this file,the configuration for mqtt Broker can be set. Example Port selection 1883 etc.
mosquitto:This is the application file which can be run to start the mqtt Broker
mosquitto_passwd:This file can be used to set the user name and password for establishing connection with Mqtt Broker
mosquitto_pub : This file can be run to publish the the message form publisher client.
mosquitto_sub: Run this file to receive the published message arrived at the broker end for the particular topic.
Here the process of install mosquitto broker on windows is complete.
Let us see how to use mosquitto mqtt broker in windows?
Start the Moquitto Mqtt Broker
Press Windows+R key and type cmd.
The command prompt window will open.
Just go to the mosquitto mqtt broker folder(e.g, E:\mosquittobroker).
Type the command mosquitto -v
Run this command then you can see the window like this
The window shows the mosquitto Mqtt ver 2.0.14 broker has started running. it is listening the port 1833 .This shows how to check mqtt version?.
To ger more details about seeting up Mosquitto Mqtt Broker on Window Visit this video