Introduction
Communication protocols play an important role in the Internet of Things (IoT). They define how IoT devices, sensors, gateways, servers, and applications exchange data over a network. Different IoT applications have different requirements related to bandwidth, reliability, power consumption, communication architecture, and scalability. Therefore, several communication protocols are used in IoT systems. Some commonly used IoT data communication protocols are:
- Message Queuing Telemetry Transport (MQTT)
- HyperText Transfer Protocol (HTTP)
- Constrained Application Protocol (CoAP)
- Data Distribution Service (DDS)
- WebSocket
- Advanced Message Queuing Protocol (AMQP)
- Extensible Messaging and Presence Protocol (XMPP)
- OPC Unified Architecture (OPC UA)
1. Message Queuing Telemetry Transport (MQTT)
MQTT is a lightweight messaging protocol designed for communication in networks with limited bandwidth and constrained resources. It can be used in both reliable and unreliable network environments and is widely associated with IoT applications.
MQTT Publish/Subscribe Architecture
MQTT uses a publish/subscribe architecture. In this model, a central component called a broker receives messages published by clients and distributes them to other clients that have subscribed to the corresponding topic.
For example, consider a smart factory containing temperature sensors. The sensors connect to an MQTT broker and publish temperature readings to specific topics. Other MQTT clients can subscribe to those topics and receive the temperature data.
![]()
Figure 1: MQTT publish/subscribe architecture.
MQTT Quality of Service (QoS) Levels
MQTT defines three Quality of Service (QoS) levels based on message delivery reliability:
- Level 0 – At most once: There is no guarantee that the message will be delivered.
- Level 1 – At least once: Delivery is guaranteed, but duplicate messages may be received.
- Level 2 – Exactly once: Delivery is guaranteed and the message is delivered without duplication.
2. HyperText Transfer Protocol (HTTP)
HTTP is one of the most widely used protocols on the World Wide Web (WWW). Since IoT devices also exchange data over networks, HTTP can be used for IoT communication. However, it is not specifically optimized for resource-constrained IoT devices.
Limitations of HTTP for IoT
- Communication Overhead: HTTP communication can involve considerable overhead, which may be inefficient when a large number of sensors need to communicate.
- Client-Server Architecture: Traditional HTTP communication follows a request-response model in which the client sends a request and the server provides a response.
- Power Consumption: HTTP commonly operates over TCP, which can require more processing and communication resources than lightweight IoT protocols.
- Resource Constraints: The overhead associated with HTTP can make it less suitable for highly constrained, battery-powered IoT devices.
3. Constrained Application Protocol (CoAP)
CoAP is a web transfer protocol designed specifically for constrained devices and networks with limited bandwidth and processing resources. CoAP follows a client-server architecture and is designed in a way that is similar to HTTP. It also supports the Representational State Transfer (REST) architectural style.
CoAP Methods
CoAP clients can send requests to servers using methods such as:
- GET: Retrieves a resource.
- POST: Creates or processes a resource.
- PUT: Updates or creates a resource.
- DELETE: Deletes a resource.
CoAP commonly uses UDP as its transport protocol. Unlike TCP-based communication, basic UDP communication does not inherently guarantee delivery, although CoAP provides mechanisms for reliable message delivery when required. CoAP is designed for networks containing many constrained devices that may not always be connected and may have limited processing capabilities.
4. Data Distribution Service (DDS)
Data Distribution Service (DDS) is a data-centric communication protocol that uses a publish/subscribe model similar to MQTT. One important difference is that DDS does not require a central broker for communication.
In a DDS system, publishers and subscribers can communicate within the same network. For example, temperature sensors can publish data while other devices, such as mobile devices or monitoring systems, subscribe to that data.
DDS Global Data Space
DDS uses the concept of a Global Data Space (GDS), in which participating nodes can discover and communicate with one another without relying on a central broker.
![]()
Figure 2: DDS Global Data Space.
Nodes can dynamically join or leave the network through the discovery mechanisms provided by DDS.
5. WebSocket
WebSocket is a communication technology associated with HTTP that provides persistent, bidirectional communication between a client and a server.
A WebSocket connection typically begins with an HTTP-based handshake. After the connection is established, the client and server can exchange messages in both directions over the same persistent TCP connection until the connection is closed.
![]()
Figure 3: Comparison between HTTP and WebSocket.
WebSocket for IoT
WebSocket can be useful for IoT applications that require continuous, real-time, bidirectional communication. However, compared with lightweight protocols specifically designed for constrained IoT devices, WebSocket can involve greater communication and resource overhead.
6. Advanced Message Queuing Protocol (AMQP)
Advanced Message Queuing Protocol (AMQP) is a messaging protocol that was originally developed for reliable message exchange, particularly in financial and enterprise environments. It can also be used in certain IoT applications. AMQP supports different messaging patterns, including request/response and publish/subscribe architectures AMQP commonly operates over TCP and provides mechanisms for reliable message delivery and acknowledgments.
AMQP Delivery Semantics
- At most once: The sender does not wait for an acknowledgment from the receiver before considering the message handled. A message may be lost.
- At least once: The sender expects an acknowledgment from the receiver. If the acknowledgment is not received, the message may be retransmitted, which can result in duplicate delivery.
- Exactly once: The system coordinates message delivery so that the message is processed only once. This generally requires additional coordination between the sender and receiver.
7. Extensible Messaging and Presence Protocol (XMPP)
Extensible Messaging and Presence Protocol (XMPP) is an open, decentralized communication protocol based on Extensible Markup Language (XML). It was originally associated with the Jabber messaging system. XMPP is designed for exchanging structured XML messages between networked entities. One of its important characteristics is its addressing and identification mechanism.
XMPP Addressing
XMPP uses a Jabber ID (JID) to identify entities. A JID commonly follows a format similar to:
user@domain.com
This addressing system allows XMPP entities to communicate across different networks and domains.
8. OPC Unified Architecture (OPC UA)
OPC Unified Architecture (OPC UA) is a communication architecture and standard designed primarily for industrial communication and interoperability. OPC UA focuses strongly on providing compatibility across different manufacturers, operating systems, programming languages, and industrial systems. According to the OPC Foundation, OPC UA is implemented by numerous industrial vendors as an open standard for industrial interoperability.
OPC UA Communication Models
OPC UA supports multiple communication models, including:
- Client-Server: A client requests information or services from a server.
- Publish-Subscribe: Data can be distributed to multiple subscribers without requiring each subscriber to make individual requests.
OPC UA is designed to be transport-independent, allowing different transport mechanisms to be used depending on the application requirements.
Comparison of IoT Data Protocols
| Protocol | Communication Model | Key Characteristic | Common Use |
|---|---|---|---|
| MQTT | Publish/Subscribe | Lightweight and suitable for constrained networks | IoT sensors, telemetry, smart systems |
| HTTP | Request/Response | Widely used web protocol | Web services and IoT applications |
| CoAP | Client/Server | Designed for constrained devices and networks | Resource-constrained IoT devices |
| DDS | Publish/Subscribe | Brokerless, data-centric communication | Real-time and distributed systems |
| WebSocket | Bidirectional | Persistent communication over TCP | Real-time applications |
| AMQP | Multiple messaging patterns | Reliable messaging and acknowledgments | Enterprise and messaging systems |
| XMPP | Message-based | XML-based decentralized communication | Messaging and distributed communication |
| OPC UA | Client/Server and Publish/Subscribe | Industrial interoperability | Industrial IoT and automation |
Conclusion
IoT communication protocols provide the foundation for exchanging information between sensors, devices, gateways, servers, and applications. Different protocols are designed for different communication requirements. MQTT is lightweight and widely suited to telemetry and constrained IoT environments, while CoAP is designed specifically for constrained devices and networks. DDS provides brokerless, data-centric communication, whereas WebSocket supports persistent bidirectional communication.
AMQP focuses on reliable messaging, XMPP provides XML-based decentralized communication, and OPC UA is particularly important for interoperability in industrial communication systems. HTTP, meanwhile, remains useful when IoT devices need to interact with conventional web services. The selection of an IoT communication protocol depends on factors such as bandwidth, power consumption, reliability, communication model, scalability, device constraints, and application requirements.