📜  COAP和MQTT协议之间的区别

📅  最后修改于: 2021-08-25 18:13:34             🧑  作者: Mango

1.受限应用协议(COAP):
受限的应用程序协议是基于客户端服务器的协议。使用此协议,可以在COAP服务器命令的不同客户端节点之间共享COAP数据包。服务器负责根据其逻辑共享信息,但不必确认。与支持状态传输模型的应用程序一起使用。

2.消息查询遥测传输(MQTT):
消息查询遥测传输协议是用于物联网设备的基于通信的协议。该协议基于发布-订阅方法,在该方法中,客户端仅通过代理接收订阅主题的信息。 Broker是一个中介,可以在传递消息之前将消息分类为标签。

COAP和MQTT协议之间的区别:

Basis of COAP MQTT
Abbrevation Constrained Application Protocol Message Query Telemetry Transport
Communication Type It uses Request-Response model. It uses Publish-Subscribe model
Messaging Mode This uses both Asynchronous and Synchronous. This uses only Asynchronous
Transport layer protocol This mainly uses User Datagram protocol(UDP) This mainly uses Transmission Control protocol(TCP)
Header size It has 4 bytes sized header It has 2 bytes sized header
RESTful based Yes it uses REST principles No it does not uses REST principles
Persistence support It does not has such support It supports and best used for live data communication
Message Labelling It provides by adding labels to the messages. It has no such feature.
Usability/Security It is used in Utility area networks and has secured mechanism. It is used in IoT applications and is secure