当前位置:网站首页>Initial love with mqtt
Initial love with mqtt
2022-06-30 06:28:00 【Front thought】

Before : After work this afternoon, I ate noodles with my back-end colleagues in the noodle shop downstairs , While waiting for a meal , The ordering machine keeps reporting :“ You have a new take out order , Please handle in time !”, Asked the back-end colleague :“ Do you know how this real-time voice broadcast is realized ?”, I don't know ! Ha ha ha !!! Because we are engaged in Internet development , Strictly speaking , This belongs to the category of the Internet of things ! Later, after playing games with friends from the Internet of things, she learned that it was through MQTT Implementation of message queuing transmission protocol ! Because she has done the function of one button alarm system ! In fact! ! The Internet has encountered similar functions in its usual development , In fact, it calls and publishes as usual / subscribe api The same thing !!! So let's learn about the agreement today !!!
MQTT It's a client based - Server news release / Subscription transport protocol .MQTT The agreement is light weight 、 Simple 、 Open and easy to implement , These features make it very versatile . In many cases , Including in a limited environment , Such as : Machines and machines (M2M) Communications and the Internet of things (IoT). Its presence , Communication of sensors via satellite link 、 Occasionally dialing medical devices 、 Smart home 、 And some miniaturized equipments have been widely used .
1、 The message broker Broker:

Common information proxy platforms :
1.mosquitto:【 brief introduction 】mosquitto yes ecpllse The open source Broker,
2.EMQ:【 brief introduction 】EMQ It is an open-source product made by Chinese people Broker,
3.HiveMQ:【 brief introduction 】HiveMQ It's enterprise class Broker,
4.MqttWk:【 brief introduction 】mosquitto It is written by Alibaba based on nutzboot+nrtty+redis+kafka Realized MQTT Open source services Broker,
The three functions of information agency :
1. Receive messages from the device ,
2. Filtering messages ,
3. Send a message to the device subscribing to the theme change ,
2、 Publish and subscribe mode :

Subscription contains topic filter (Topic Filter) And maximum quality of service (QoS). The subscription will have a conversation with (Session) relation . A session can contain multiple subscriptions . Each subscription in each session has a different topic filter .
After each client establishes a connection with the server, it is a session , There is state interaction between the client and the server . A conversation exists between networks , It is also possible to span multiple continuous network connections between the client and the server .
3、 The theme :

Tag to connect to an application message , This tag matches the subscription of the server . The server will send the message to each client of the tag that the subscription matches .
A wildcard filter for topic names , In order
4、 Service quality level :

边栏推荐
猜你喜欢
随机推荐
Redux source code implementation
Base64 explanation: playing with pictures Base64 encoding
Usage of case, casez and casex statements in Verilog
Go pack and unpack
[untitled]
Share problems solved
Is it safe to open an account online? Can you open an account to speculate on the Internet?
Combat simulation system data
数据读写:Unity中基于C#脚本实现数据读写功能
Spin official tutorial
Centos8 install redis
High performance distributed execution framework ray
Unclear about glide loading picture
Résoudre le problème de décompiler la compilation normale
Rotate dimension tool rolabelimg
Arrangement of in-depth learning materials
ES6 array
Common address collection
Getting started with research
Collection and method of traversing collection elements (1)









