Mqtt push message based on the (a) Selection of Technology


App soap project structure originally transmitted the data, because the data part is dynamic, so the need to regularly poll for new data. Due to the size of the updated data itself is not very large, consider using message push way to update the data.

Technology Selection

mq program can choose from a lot of selection criteria that can be used to move quickly end, cross-platform (App now have two versions of Android and IOS), it can be used in complex network environments. mqtt fully meet the above requirements, first of all mqtt was developed by IBM led the design goal is to help embedded devices fast and stable data transmission, the protocol itself is open source, built on tcp protocol. And a large number of open source server and client implementation, now mqtt belong to eclipse Foundation. In github page mqtt implementation of relevant connections, links:

Server selection

Server implementations to choose from:

Briefly about the advantages and disadvantages of various implementations of (only illustrates the tried and test the other's own):


mqtt protocol itself is proposed by IBM, but for the average user WebsphereMQ body is too big, too difficult to get started


Official Website:  protocol type supported MQTT v3.1 / v3.1.1. Mosquitto itself is open source under the BSD license, the official website you can download the source code to facilitate their custom, but Mosquitto implemented by c, more difficult to get started. In addition Mosquitto provides libmosquitto for clients to use.

3.Eclipse Paho

Official website: , attributable to eclipse Foundation provides an open mosquitto implementation address:, port 1883. Mainly provide a large number of client implementation library (this project Andoird client uses )


Official website: , Great God domestic development of the service side, very tough. Based on erlang development, open source under the MIT license itself, the project hosted , protocol support to MQTT V3.1.1, supports HTTP Publish API and WebSocket access, support for cluster deployment, support for plug-ins style development. Interception of the performance test as follows:
Performance Testing

Performance Testing

erlang is still difficult for the average user to use, if there is no custom development needs, consider using. Other authors provide client libraries, including the IOS client with a swift build.

Official website: , Aurora push original commercial platform created CTO Zhang Hu, erlang development, support HTTP Publish API and WebSocket, use the next, the results were good, IOS sdk docking of very simple, in addition sdk provides various platforms, most are implemented based on the existing open-source library. Free users have a certain limit, if need commercial support is a good choice.


Node.js server to achieve the development of the project is hosted on , supports WebSocket access, open source under the MIT license itself. Redis support data persistence and mongo, deployment support docker. Second development is very simple, a major factor in this is the last item selected. Attached technical articles for mosca description of a blog of , I was more than a reference in the development process, to express my gratitude.

Written in the last

In fact, a very important technology selection principle is to choose their own programs and not the best solution. In the next article will introduce the use of Mosca those pits were encountered secondary development, so stay tuned!



Guess you like