MQTT is a one of most popular machine-to-machine (M2M) connectivity protocol. It was designed with extremely lightweight that support embedded and low power processing device. MQTT popularly used in samrtphone chat application and sensor communication. You can find more information about MQTT from here. MQTT is broker based message queuing system. It is very to install open Source MQTT server like Mosquitto using a simple apt-get or yum command.
sudo apt-get install mosquittoEclipse Paho is one mqtt client work well with mosquitto. The below MQTT subscriber and publisher code based on java eclipse paho library 1.0.1. You can also use public mosquitto server in http://test.mosquitto.org/
MQTT subscriber
MQTT publisher
Complete eclipse project https://bitbucket.org/mkjinesh/mqttclient
No comments:
Post a Comment