MQTT vs DDS: A Comparison of IoT Protocols

This article compares MQTT and DDS (Data Distribution Service) protocols, both widely used in IoT. We’ll explore their differences in architecture, requirements, complexity, and other key aspects.

MQTT Protocol

Broker based MQTT protocol

Figure 1: MQTT protocol architecture

Here are the key features of the MQTT protocol:

  • It comprises three main components: publishers, a broker, and subscribers.
  • It’s based on a publish/subscribe architecture.
  • Publishers (e.g., sensors or IoT devices) send data or information updates to the broker based on specific topics.
  • Subscribers (e.g., applications) register with the broker to receive updates related to particular topics or sensor data.

DDS Protocol

The following are key features of the DDS protocol:

  • It’s a broker-less protocol primarily used for Machine-to-Machine (M2M) and IoT applications.
  • It operates at the session layer of the OSI model.
  • Instead of a broker, it employs data writers and data readers.
  • Similar to MQTT, it follows a publish/subscribe model but without a central broker.
  • It offers 23 Quality of Service (QoS) levels, encompassing security, priority, reliability, urgency, durability, and more.

DDS Protocol Workflow:

  1. A Publisher distributes the sensory data to be delivered.
  2. A Data Writer interacts with the publisher, managing any changes to be sent to subscribers.
  3. Data Readers receive the published data and deliver it to the corresponding subscribers.
  4. Subscribers must subscribe to specific topics, representing the sensory data they wish to receive.

MQTT vs. DDS: A Comparative Table

The following table provides a detailed comparison between MQTT and DDS protocols:

FeatureMQTTDDS
Full FormMessage Queue Telemetry TransportData Distribution Service
ArchitectureCentralized; all communications route through the broker.Decentralized; peer-to-peer communication.
Transport LayerTCPUDP
Admin NeededYes, a broker needs to be installed and clients configured with its address.No, automatic discovery (plug and play), self-forming, self-healing.
Message RateFew messages per second per device.Up to 10,000s of messages per second per device.
Service InterruptionsTolerable.Potentially calamitous.