当前位置:网站首页>与MQTT的初定情缘
与MQTT的初定情缘
2022-06-30 06:18:00 【Front 小思】

前要:今天下午下班与后端同事在楼下面馆吃面,在等餐的时候,点餐机器不停地报:“您有新的外卖订单,请及时处理!”,后端同事问:“你知道这实时语音播报是怎么实现的吗?”,其实我也不知道!哈哈哈!!!因为我们的是从事互联网开发的,严谨来说,这属于物联网范畴的!后来与从事物联网的朋友打游戏问了她才知道是通过MQTT消息列队传输协议实现的!因为她做过一键报警系统功能!其实吧!互联网平时开发也遇到过类似这的功能,其实和平时调用发布/订阅api一样的道理!!!所以今天专门了解一下该协议!!!
MQTT是一个基于客户端-服务器的消息发布/订阅传输协议。MQTT协议是轻量、简单、开放和易于实现的,这些特点使它适用范围非常广泛。在很多情况下,包括受限的环境中,如:机器与机器(M2M)通信和物联网(IoT)。其在,通过卫星链路通信传感器、偶尔拨号的医疗设备、智能家居、及一些小型化设备中已广泛使用。
1、消息代理Broker:

常见的信息代理平台:
1.mosquitto:【简介】mosquitto是ecpllse的开源Broker,
2.EMQ:【简介】EMQ是是国人出的开源Broker,
3.HiveMQ:【简介】HiveMQ是企业级的Broker,
4.MqttWk:【简介】mosquitto是一个阿里编写基于nutzboot+nrtty+redis+kafka实现的MQTT服务开源Broker,
信息代理的三个作用:
1.接收设备发来的消息,
2.过滤消息,
3.发送消息到订阅改专题的设备上,
2、发布与订阅模式:

订阅包含主题筛选器(Topic Filter)和最大服务质量(QoS)。订阅会与一个会话(Session)关联。一个会话可以包含多个订阅。每一个会话中的每个订阅都有一个不同的主题筛选器。
每个客户端与服务器建立连接后就是一个会话,客户端和服务器之间有状态交互。会话存在于一个网络之间,也可能在客户端和服务器之间跨越多个连续的网络连接。
3、主题:

连接到一个应用程序消息的标签,该标签与服务器的订阅相匹配。服务器会将消息发送给订阅所匹配标签的每个客户端。
一个对主题名通配符筛选器,在订
4、服务质量等级:

边栏推荐
- As function memo
- 46. full arrangement -dfs double hundred code
- Golang's handwritten Web Framework
- IO stream (file class introduction)
- ES6数组遍历与ES5数组遍历
- Learn fpga---ram IP core and key parameters from the bottom structure
- Intelligent question - horse racing question
- When to use redis
- 1.8 - 多级存储
- Improve simulation speed during ROS and Px4 joint simulation
猜你喜欢

Rhcsa day 1

IO streams (common streams)

01. 正则表达式概述

文件操作IO-Part1

Mysql database learning notes - foreign keys, table connections, subqueries, and indexes for MySQL multi table queries

1.9 - 存储器的分类

Use and principle of completionservice (source code analysis)

Why does the verification code not refresh when clicked

Golang's handwritten Web Framework

JS prototype chain object function relationship
随机推荐
Mariadb数据库的安装与初始化
My experience in functional testing for so many years
Is it safe to open an account online? Can you open an account to speculate on the Internet?
Problems related to pinduoduo store search, why can't new products be found on the shelves
2020-10-06
Decompilation normal decompilation problems. Solve them yourself
多线程进阶篇
一个完整的性能测试流程
Strlen and sizeof, array length and string length, don't be silly
Mysql database learning notes - foreign keys, table connections, subqueries, and indexes for MySQL multi table queries
Network basics
1.9 - Cache
Share problems solved
ES6扩展运算符(...)
Arrangement of in-depth learning materials
How to use unmarshaljson
As function memo
ES6解构赋值
Notes of the first week of 2021 Chengdu Arts and Sciences cloud computing intensive training class
Swoole process model diagram