0

Referring to the Stack Overflow question Protocol Terminology: Message versus Packet, I would like to relate the following accepted opinion to the MQTT protocol.

These are definitely messages. A "packet" is a layer-3 (in ISO terminology) protocol unit, such as an IP packet; and a "datagram" is a layer-1 or layer-2 unit, such as the several Ethernet datagrams that might make up the fragments of an IP packet. So a message might be split across several packets, particularly if you're using a streaming protocol such as TCP, and a packet might be split across several datagrams.

The MQTT protocol defines control packets.

The MQTT protocol works by exchanging a series of MQTT Control Packets in a defined way.

Referring to the accepted answer of the linked Stack Overflow question, is MQTT using the word packet incorrect? Or is there something else to consider which makes the use of the word packet correct?

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83

1 Answers1

0

Words have no intrinsic meaning; they mean what we agree they mean. As the answer mentions "ISO terminology" lets start with the definition for "Packet" given in the ISO "Information technology — Vocabulary" (ISO/IEC 2382:2015):

sequence of bits arranged in a specific format, containing control data and possibly user data, and that is transmitted and switched as a whole

Whether an MQTT Control packet meets this definition will depend upon how you interpret "transmitted and switched as a whole".

The definition differs somewhat elsewhere; even in other ISO standards. A quick search found ISO/IEC 14476-1:2002 which defines "Packet" more in line with the way the answer you refer to does:

Represents a unit of transport data, which is equivalent to a segment in TCP/IP and a transport protocol data unit (TPDU) in OSI model...

So I guess the definition depends upon the context. Having said that, I believe that its difficult to argue that the usage in the MQTT spec is incorrect "in ISO terminology". I say this because the MQTT spec is, in fact, an ISO standard (ISO/IEC 20922:2016) which includes the definition for "MQTT Control Packet":

A packet of information that is sent across the Network Connection. The MQTT specification defines fourteen different types of Control Packet, one of which (the PUBLISH packet) is used to convey Application Messages.

Brits
  • 14,829
  • 2
  • 18
  • 31