How unit 4 is examined
This unit covers the IoT application-layer protocols MQTT, SMQTT, CoAP, XMPP and AMQP; CoAP and SMQTT carry the most marks, then MQTT and AMQP.
MQTT
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. <mark>MQTT (Message Queuing Telemetry Transport) is a lightweight publish-subscribe messaging protocol that runs over TCP, in which clients exchange messages on named topics through a central broker.</mark>
Diagram.
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u4-01" viewBox="0 0 510 252" width="510" height="252" role="img" aria-label="MQTT: publisher (temperature sensor) sends to the broker on topic home/temp; broker forwards to subscribers S1 (mobile app) and S2 (fan controller)"><style>#dsfig-u4-01 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u4-01 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u4-01 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u4-01 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u4-01 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u4-01 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u4-01 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u4-01 .t{fill:#16181D;font-weight:500}#dsfig-u4-01 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u4-01 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u4-01 .dot{fill:#16181D}#dsfig-u4-01 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u4-01 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u4-01 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u4-01 .ah{fill:#454C5A}#dsfig-u4-01 .ah.hi{fill:#2340B8}#dsfig-u4-01 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u4-01 .wl .t{font-size:12px;font-weight:700}#dsfig-u4-01 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u4-01 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u4-01 .e{stroke:#B1B7C3}html.dark #dsfig-u4-01 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u4-01 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u4-01 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u4-01 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u4-01 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u4-01 .t{fill:#E6E8ED}html.dark #dsfig-u4-01 .t.inv{fill:#0F1115}html.dark #dsfig-u4-01 .kd{stroke:#E6E8ED}html.dark #dsfig-u4-01 .dot{fill:#E6E8ED}html.dark #dsfig-u4-01 .ann{fill:#8FA3FF}html.dark #dsfig-u4-01 .lbl{fill:#858D9C}html.dark #dsfig-u4-01 .ptr{fill:#8FA3FF}html.dark #dsfig-u4-01 .ah{fill:#B1B7C3}html.dark #dsfig-u4-01 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u4-01 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u4-01 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u4-01 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah14" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh14" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59,126 L234,126" marker-end="url(#ah14)"/><path class="e" d="M272.6,118.9 L450.5,47.8" marker-end="url(#ah14)"/><path class="e" d="M272.6,133.1 L450.5,204.2" marker-end="url(#ah14)"/><g class="wl"><rect x="116.8" y="117" width="61.5" height="18" rx="9"/><text class="t" x="147.5" y="126" dy=".35em" text-anchor="middle">publish</text></g><g class="wl"><rect x="331.8" y="74" width="61.5" height="18" rx="9"/><text class="t" x="362.5" y="83" dy=".35em" text-anchor="middle">deliver</text></g><g class="wl"><rect x="331.8" y="160" width="61.5" height="18" rx="9"/><text class="t" x="362.5" y="169" dy=".35em" text-anchor="middle">deliver</text></g><circle class="n" cx="40" cy="126" r="18"/><text class="t" x="40" y="126" dy=".35em" text-anchor="middle">Pub</text><circle class="n" cx="255" cy="126" r="18"/><text class="t" x="255" y="126" dy=".35em" text-anchor="middle">Brk</text><circle class="n" cx="470" cy="40" r="18"/><text class="t" x="470" y="40" dy=".35em" text-anchor="middle">S1</text><circle class="n" cx="470" cy="212" r="18"/><text class="t" x="470" y="212" dy=".35em" text-anchor="middle">S2</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">MQTT: publisher (temperature sensor) sends to the broker on topic home/temp; broker forwards to subscribers S1 (mobile app) and S2 (fan controller)</figcaption></figure>
Key points.
- MQTT follows the publish-subscribe model, so the sender (publisher) and the receiver (subscriber) never know each other and only talk through the broker.
- The broker receives every message, filters it by topic and forwards it to all clients subscribed to that topic.
- A topic is a hierarchical string such as
home/room1/temp, and subscribers may use wildcards+(one level) and#(all levels below). - The header is only 2 bytes minimum and the protocol runs over TCP port 1883 (8883 with TLS), so it suits low-bandwidth, low-power constrained devices.
- Three QoS levels are offered: QoS 0 at most once, QoS 1 at least once, QoS 2 exactly once.
- Retained messages and Last Will and Testament give a new subscriber the last value and announce an abnormally disconnected client.
- Role in IoT: it gives lightweight machine-to-machine messaging and telemetry, decouples devices in space and time, and scales to thousands of sensors.
Example. A temperature sensor publishes 25 on topic home/temp; a mobile app subscribed to home/temp receives it through the broker instantly.
Answer frame. Open with the definition; draw the publisher-broker-subscriber figure with the topic on the arrows; develop points 1-5 in order with the temperature example; close with point 7 (role in IoT).
Asked: [7 marks] (May 2023, May 2024) Explain with example MQTT Protocol. What is role of MQTT protocol in IoT?
MQTT methods and components
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. MQTT components are the client (publisher or subscriber) and the broker; its methods are the control packets clients use to talk to the broker.
Key points.
- The main methods are CONNECT (open a session), PUBLISH (send a message on a topic), SUBSCRIBE (register interest in topics) and UNSUBSCRIBE (remove it).
- The broker answers with CONNACK, SUBACK and UNSUBACK, and PUBACK/PUBREC/PUBREL/PUBCOMP handle QoS 1 and 2 acknowledgements.
- PINGREQ and PINGRESP keep the connection alive, and DISCONNECT closes it cleanly.
- Components: publisher, subscriber, broker and topic.
MQTT communication
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. MQTT communication is many-to-many message exchange in which publishers send to topics on the broker and the broker pushes each message to that topic's subscribers.
Key points.
- A client first sends CONNECT, the broker replies CONNACK, then the client publishes or subscribes.
- Publish-subscribe decouples devices in space (no addresses), time (broker can retain messages) and synchronisation (no waiting for a reply), so devices can be added without changes.
- One published message reaches many subscribers, which gives scalability and saves bandwidth.
- QoS 0, 1 and 2 let each message choose its reliability against overhead.
- Broker, client and topic are the three key concepts of the model.
Asked: [7 marks] (May 2026) Define MQTT and Explain the role of publish-subscribe communication mechanisms in MQTT based IoT systems.
Topics and applications
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. An MQTT topic is a UTF-8, slash-separated string that the broker uses to route messages, for example factory/line1/temp.
Key points.
- Wildcards work only in subscriptions:
+matches one level and#matches all remaining levels. - Topic names are case-sensitive and clients need no pre-registration of topics.
- Applications: smart home control, industrial monitoring, vehicle telematics, healthcare monitoring and Facebook Messenger.
SMQTT
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>
Definition. <mark>SMQTT (Secure MQTT) is MQTT made secure, either by running it over TLS/SSL or, in the SMQTT scheme, by lightweight encryption so that only authorised subscribers can read the published messages.</mark>
Key points.
- Plain MQTT sends data and credentials in clear text, so SMQTT adds confidentiality, integrity and authentication on top of the same publish-subscribe model.
- With TLS/SSL, the client and broker perform a handshake and the broker presents a certificate, which authenticates the server and, with client certificates, the client as well.
- After the handshake the whole channel is encrypted, normally on port 8883, so eavesdropping and tampering are prevented.
- In the SMQTT scheme, the publisher encrypts each message with a key based on lightweight attribute-based or elliptic-curve encryption, and the broker forwards the ciphertext without reading it.
- SMQTT has four stages: setup, encryption, publish and decryption; only subscribers holding the matching key can decrypt.
- The QoS 0, 1 and 2 levels still work, so reliable delivery is kept alongside security.
- Username and password or client certificates control who may publish or subscribe.
Answer frame. Open with "SMQTT is secure MQTT"; draw publisher-broker-subscriber with an encrypted link and a certificate; develop points 1-5 in order; close with point 6 (secure yet lightweight).
RFID (short note). Radio Frequency Identification uses tags (chip plus antenna storing an ID) and readers that read them by radio waves without contact or line of sight; it is used for tracking, access control and supply chains, and its readings reach the IoT cloud through protocols like MQTT.
WebSockets (short note). WebSocket gives a full-duplex, persistent channel over one TCP connection after an HTTP upgrade handshake, so a server can push data without polling; MQTT can run over WebSockets so browsers can be MQTT clients.
Asked: [14 marks] (May 2023) Write a short note on following: a) RFID b) Web sockets c) SMQTT Asked: [? marks] (Dec 2024) What is SMQTT? How does securely messages transferred by it?
CoAP
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>
Definition. <mark>CoAP (Constrained Application Protocol) is a lightweight RESTful application-layer protocol, defined in RFC 7252, that runs over UDP and lets constrained IoT devices interact like a small HTTP.</mark>
Diagram.
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u4-02" viewBox="0 0 424 80" width="424" height="80" role="img" aria-label="CoAP client-server: a confirmable GET request from the client is answered by an ACK piggybacking the response and content"><style>#dsfig-u4-02 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u4-02 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u4-02 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u4-02 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u4-02 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u4-02 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u4-02 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u4-02 .t{fill:#16181D;font-weight:500}#dsfig-u4-02 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u4-02 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u4-02 .dot{fill:#16181D}#dsfig-u4-02 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u4-02 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u4-02 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u4-02 .ah{fill:#454C5A}#dsfig-u4-02 .ah.hi{fill:#2340B8}#dsfig-u4-02 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u4-02 .wl .t{font-size:12px;font-weight:700}#dsfig-u4-02 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u4-02 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u4-02 .e{stroke:#B1B7C3}html.dark #dsfig-u4-02 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u4-02 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u4-02 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u4-02 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u4-02 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u4-02 .t{fill:#E6E8ED}html.dark #dsfig-u4-02 .t.inv{fill:#0F1115}html.dark #dsfig-u4-02 .kd{stroke:#E6E8ED}html.dark #dsfig-u4-02 .dot{fill:#E6E8ED}html.dark #dsfig-u4-02 .ann{fill:#8FA3FF}html.dark #dsfig-u4-02 .lbl{fill:#858D9C}html.dark #dsfig-u4-02 .ptr{fill:#8FA3FF}html.dark #dsfig-u4-02 .ah{fill:#B1B7C3}html.dark #dsfig-u4-02 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u4-02 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u4-02 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u4-02 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah15" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh15" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M58.7,43.5 Q212,72 363.4,43.8" marker-end="url(#ah15)"/><path class="e" d="M365.3,36.5 Q212,8 60.6,36.2" marker-end="url(#ah15)"/><g class="wl"><rect x="180.8" y="48.8" width="61.5" height="18" rx="9"/><text class="t" x="211.5" y="57.8" dy=".35em" text-anchor="middle">CON-GET</text></g><g class="wl"><rect x="178.1" y="13.2" width="68.7" height="18" rx="9"/><text class="t" x="212.5" y="22.2" dy=".35em" text-anchor="middle">ACK+2.05</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">Cl</text><circle class="n" cx="384" cy="40" r="18"/><text class="t" x="384" y="40" dy=".35em" text-anchor="middle">Sv</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">CoAP client-server: a confirmable GET request from the client is answered by an ACK piggybacking the response and content</figcaption></figure>
Key points.
- CoAP is designed for constrained nodes with little memory, CPU and power, and constrained networks such as 6LoWPAN with high packet loss.
- It uses UDP instead of TCP, so there is no connection set-up and the header is only 4 bytes, giving very low overhead.
- It follows the REST model with a client and a server: resources are named by URIs (
coap://host/temp) and accessed with GET, POST, PUT and DELETE. - Reliability is optional: a Confirmable (CON) message is retransmitted until acknowledged, while a Non-confirmable (NON) message is sent without acknowledgement.
- Observe lets a client subscribe to a resource and get notified on change, and block-wise transfer splits large payloads into small blocks.
- Resource discovery uses the well-known URI
/.well-known/core, so a device can list what its neighbours offer. - It maps easily to HTTP through proxies and supports multicast, which suits device-to-device use.
Use on the same constrained network. Each device runs a CoAP server exposing its resources and can also act as a client. One device sends GET coap://[node]/temp over UDP directly to a neighbour, discovers resources through /.well-known/core or multicast, and uses Observe for updates. This is justified by the small header, no TCP handshake, low memory and power use, and built-in discovery.
Answer frame. Open with the definition (REST, UDP, constrained); draw the client-server figure; develop points 1-6 in order for a definition question, or the four methods, CON/NON, Observe and block transfer for the "basic operations" question; close with the justification of low overhead and discovery.
Pitfall: Do not say CoAP uses TCP or is publish-subscribe by default; it is UDP-based request-response, with Observe as the subscription extension.
Asked: [7 marks] (May 2022, Dec 2024, May 2024, Jun 2025) Explain CoAP. How it can be used between devices on the same constrained network? Justify it. Asked: [7 marks] (May 2023) Write about the basic operations available in CoAP protocol.
CoAP message types
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. CoAP has four message types carried in the 2-bit Type field of the header: CON, NON, ACK and RST.
Key points.
- Confirmable (CON) messages need an acknowledgement and are retransmitted with exponential back-off if none arrives.
- Non-confirmable (NON) messages are fire-and-forget, used for frequent sensor readings where a loss is acceptable.
- Acknowledgement (ACK) confirms a CON message and may carry the response.
- Reset (RST) tells the sender that a message was received but could not be processed, or that context is missing.
- Messages are matched by a Message ID, and requests to responses by a Token.
Asked: [7 marks] (May 2026) Describe CoAP message types and explain the CoAP request-response model with suitable examples.
CoAP Request-Response model
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. In the CoAP request-response model a client sends a request carrying a method code and the server replies with a response code.
Key points.
- Methods are GET (read), POST (create), PUT (update) and DELETE (remove), for example
GET /tempreturns22.5with code 2.05 Content. - A piggybacked response travels inside the ACK of a CON request, used when the server can answer at once.
- A separate response is used when the server needs time: it sends an empty ACK first and later a new CON or NON message carrying the answer with the same Token.
XMPP
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. XMPP (Extensible Messaging and Presence Protocol) is an XML-based, real-time protocol, originally built for instant messaging, that is used in IoT for presence and messaging between devices.
Key points.
- It gives presence awareness, so the status of a device (online, offline, busy) is known and can trigger actions.
- It supports asynchronous, near-real-time messaging, allowing device-to-device and device-to-cloud communication over TCP with a decentralised client-server design.
- Extensibility through XEP extensions and XML namespaces lets developers add custom features such as sensor data, discovery and control.
- It has built-in security with TLS and SASL, and addresses like
device@domainidentify each device. - Its drawback is that verbose XML makes it heavier than MQTT or CoAP.
Asked: [? marks] (Dec 2024) How does XMPP improves the IoT services?
AMQP features and components
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. <mark>AMQP (Advanced Message Queuing Protocol) is an open, binary, TCP-based message-oriented middleware protocol that delivers messages reliably between applications through a broker of exchanges and queues.</mark>
Key points.
- Reliability: messages are acknowledged and persisted, with delivery modes at-most-once, at-least-once and exactly-once.
- Routing: an exchange routes each message to queues by rules called bindings, using direct, fanout, topic or headers exchange types.
- Queuing stores messages until a consumer is ready, so producers and consumers work independently.
- Security uses TLS and SASL authentication.
- Components: producer (publisher), broker, exchange, queue, binding and consumer.
- Message structure: the header and properties (message-id, timestamp, content-type, delivery-mode, priority) are the attributes, and the body is the payload, the actual application data.
- AMQP has 4 frame types in version 0-9-1: method, content header, content body and heartbeat (version 1.0 instead uses performatives such as open, begin, attach, transfer, flow, disposition, detach, end, close).
Comparison.
| Basis | AMQP | MQTT |
|---|---|---|
| Model | Queue-based with exchanges and bindings | Topic-based publish-subscribe |
| Overhead | Heavier header | Lighter, 2-byte header |
| Reliability | Transactions, acknowledgements, persistence | Three QoS levels |
| Routing | Rich, flexible | Simple topic match |
| Suited to | Enterprise, back-end integration | Constrained sensors |
| Transport | TCP | TCP, and WebSockets |
Application layer protocols give IoT devices a common way to exchange data, so devices from different vendors interoperate. Yes, MQTT can use WebSockets (MQTT over WebSockets), which allows browser clients.
Answer frame. Open with the definition; draw producer-exchange-queue-consumer with bindings; develop points 1-7 in order; for the comparison question, give the table, the use of application protocols and the WebSockets answer.
Asked: [7 marks] (May 2022) What is the use of application layer protocols? Differentiate between AMQP and MQTT. Does MQTT use WebSockets? Asked: [7 marks] (Jun 2025) What are the features and components of AMQP in IoT? How many frame types are there in AMQP? Asked: [? marks] (Dec 2024) What is AMQP? Explain its message attributes and payload.
AMQP frame types
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. AMQP frames are the units in which the protocol sends data over the connection; in version 0-9-1 there are four types.
Key points.
- Method frame carries a protocol command such as queue declare or basic publish.
- Content header frame carries message properties and body size, and content body frame carries the payload.
- Heartbeat frame checks that the connection is alive.
Last-minute revision
- MQTT: publish-subscribe over TCP through a broker; port 1883, TLS 8883; QoS 0, 1, 2.
- MQTT wildcards:
+single level,#multi level. - SMQTT is MQTT secured with TLS/SSL certificates or lightweight encryption.
- CoAP: RESTful, UDP, 4-byte header, RFC 7252; methods GET, POST, PUT, DELETE.
- CoAP message types: CON, NON, ACK, RST.
- CoAP Observe and block-wise transfer; discovery at
/.well-known/core. - Piggybacked response sits inside the ACK; separate response comes later.
- XMPP: XML-based, presence, extensible, real-time.
- AMQP: broker with exchange, queue and binding; exactly-once delivery possible.
- AMQP 0-9-1 frame types: method, content header, content body, heartbeat (4).
Memory hooks
- MQTT = "Mail Truck": post the letter to the depot (broker), the depot delivers to subscribers.
- CoAP = "CON, NON, ACK, RST": the four types, CoAP is "HTTP on a diet" over UDP.
- Frames "MHBH": Method, Header, Body, Heartbeat.
- XMPP = chat with presence: "X for eXtensible XML".
- AMQP = post office with sorting: exchange sorts, queue holds.
Coverage checklist
- MQTT: publish-subscribe, broker, topics, QoS, role in IoT (May 2023, May 2024).
- MQTT methods and components: CONNECT, PUBLISH, SUBSCRIBE and broker/client.
- MQTT communication: pub-sub role (May 2026).
- topics and applications: topic levels, wildcards, uses.
- SMQTT: TLS, encryption, RFID, WebSockets (May 2023, Dec 2024).
- CoAP: definition, operations, constrained-network use (May 2022, May 2023, May 2024, Dec 2024, Jun 2025).
- CoAP message types: CON, NON, ACK, RST (May 2026).
- CoAP Request-Response model: methods, piggybacked and separate responses (May 2026).
- XMPP: presence, extensibility (Dec 2024).
- AMQP features and components: features, components, attributes, payload, comparison with MQTT (May 2022, Dec 2024, Jun 2025).
- AMQP frame types: four frame types.