<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/mqtt-doesn-t-have-message-queues-inside-the-2-byte-protocol-powering-modern-iot--khslvn3go" -->

---
title: MQTT Doesn't Have Message Queues. Inside the 2-Byte...
description: MQTT, despite its name, has no message queues: messages go to topics, not queues, and vanish if nobody is subscribed without a persistent session. Its fixed...
canonical: https://daily.dev/posts/mqtt-doesn-t-have-message-queues-inside-the-2-byte-protocol-powering-modern-iot--khslvn3go
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: MQTT Doesn't Have Message Queues. Inside the 2-Byte Protocol Powering Modern IoT. | daily.dev
og:description: MQTT, despite its name, has no message queues: messages go to topics, not queues, and vanish if nobody is subscribed without a persistent session. Its fixed...
og:url: https://daily.dev/posts/mqtt-doesn-t-have-message-queues-inside-the-2-byte-protocol-powering-modern-iot--khslvn3go
og:image: https://api.daily.dev/og/posts/KHsLVN3go.png
og:image:alt: MQTT Doesn't Have Message Queues. Inside the 2-Byte Protocol Powering Modern IoT.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MQTT Doesn't Have Message Queues. Inside the 2-Byte Protocol Powering Modern IoT.

**[DEV](https://daily.dev/sources/devto)** · 16 min read · 1 upvotes · 0 comments

## Summary

MQTT, despite its name, has no message queues: messages go to topics, not queues, and vanish if nobody is subscribed without a persistent session. Its fixed header can be as small as 2 bytes, versus hundreds of bytes for an HTTP request. It offers three QoS levels: QoS 0 (fire and forget), QoS 1 (at least once, needs idempotent consumers), and QoS 2 (exactly once, a 4-packet handshake). Brokers route messages via in-memory trie-based topic trees with wildcards, support Last Will and Testament for dead-device detection, and MQTT 5.0 adds Shared Subscriptions to load-balance messages across worker pools like Kafka consumer groups.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dev.to/smtahosin/mqtt-doesnt-have-message-queues-inside-the-2-byte-protocol-powering-modern-iot-161>

## Questions this post answers

### Does MQTT actually have message queues like RabbitMQ or Kafka?

No, MQTT does not have message queues despite the 'MQ' in its name. It delivers messages to topics, not queues: when a broker receives a PUBLISH packet it checks its in-memory subscription tree, and if zero clients are subscribed, the message is discarded immediately rather than stored. The only exception is a persistent session, where the broker buffers unacknowledged QoS 1/2 messages for a specific known ClientId.

_Clarify pub/sub versus queuing semantics before picking an IoT messaging stack, with help from daily.dev._

### What is the difference between MQTT QoS 0, QoS 1, and QoS 2?

QoS 0 is fire-and-forget with no acknowledgement or retry, used for frequent, disposable telemetry. QoS 1 guarantees at-least-once delivery via a PUBLISH/PUBACK exchange but can deliver duplicates, requiring idempotent consumers. QoS 2 guarantees exactly-once delivery through a four-packet handshake (PUBLISH, PUBREC, PUBREL, PUBCOMP), at the cost of two full round-trips, reserved for mission-critical commands like opening a security gate.

_Developers tuning IoT reliability trade-offs can keep protocol notes like these handy on daily.dev._

### How do MQTT 5.0 shared subscriptions help scale backend consumers?

Shared subscriptions, introduced in MQTT version 5.0, let multiple backend workers subscribe under a '$share/<group-name>/<topic-filter>' prefix so the broker round-robins or load-balances each incoming message to only one worker in the group instead of broadcasting it to all of them. This mirrors Kafka consumer groups and lets teams scale horizontally, for example spinning up ten more containers when traffic grows from 1,000 to 1,000,000 cars, without adding an external Kafka or RabbitMQ layer.

_Engineers scaling MQTT ingestion pipelines can track protocol-level patterns like this via daily.dev._

## Similar posts on daily.dev

- [Message Queues](https://daily.dev/posts/message-queues-irxnh6uak) · Wawandco · 0 upvotes · 0 comments
- [Now with MQTTS](https://daily.dev/posts/now-with-mqtts-kjpqliwga) · daniel.haxx.se · 1 upvotes · 0 comments
- [RabbitMQ vs SQS: The Queue Wasn’t the Hard Part. One Poison Message Was.](https://daily.dev/posts/rabbitmq-vs-sqs-the-queue-wasn-t-the-hard-part-one-poison-message-was--snxgytdau) · Medium · 1 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#backend](https://daily.dev/tags/backend), [#iot](https://daily.dev/tags/iot), [#networking](https://daily.dev/tags/networking), [#apache-kafka](https://daily.dev/tags/apache-kafka)

[View this post on daily.dev](https://daily.dev/posts/mqtt-doesn-t-have-message-queues-inside-the-2-byte-protocol-powering-modern-iot--khslvn3go)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"MQTT Doesn't Have Message Queues. Inside the 2-Byte Protocol Powering Modern IoT.","url":"https://daily.dev/posts/mqtt-doesn-t-have-message-queues-inside-the-2-byte-protocol-powering-modern-iot--khslvn3go","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/mqtt-doesn-t-have-message-queues-inside-the-2-byte-protocol-powering-modern-iot--khslvn3go"},"datePublished":"2026-10-29T04:27:50.204Z","dateModified":"2026-10-29T04:28:19.324Z","description":"MQTT, despite its name, has no message queues: messages go to topics, not queues, and vanish if nobody is subscribed without a persistent session. Its fixed...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b2469484657f4319f2900e2728ca6d28?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b2469484657f4319f2900e2728ca6d28?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"DEV","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"DEV","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/devto","url":"https://daily.dev/sources/devto"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/mqtt-doesn-t-have-message-queues-inside-the-2-byte-protocol-powering-modern-iot--khslvn3go","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,backend,iot,networking,apache-kafka","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"DEV","item":"https://daily.dev/sources/devto"},{"@type":"ListItem","position":3,"name":"MQTT Doesn't Have Message Queues. Inside the 2-Byte Protocol Powering Modern IoT."}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/mqtt-doesn-t-have-message-queues-inside-the-2-byte-protocol-powering-modern-iot--khslvn3go#faq","mainEntity":[{"@type":"Question","name":"Does MQTT actually have message queues like RabbitMQ or Kafka?","acceptedAnswer":{"@type":"Answer","text":"No, MQTT does not have message queues despite the 'MQ' in its name. It delivers messages to topics, not queues: when a broker receives a PUBLISH packet it checks its in-memory subscription tree, and if zero clients are subscribed, the message is discarded immediately rather than stored. The only exception is a persistent session, where the broker buffers unacknowledged QoS 1/2 messages for a specific known ClientId. Clarify pub/sub versus queuing semantics before picking an IoT messaging stack, with help from daily.dev."}},{"@type":"Question","name":"What is the difference between MQTT QoS 0, QoS 1, and QoS 2?","acceptedAnswer":{"@type":"Answer","text":"QoS 0 is fire-and-forget with no acknowledgement or retry, used for frequent, disposable telemetry. QoS 1 guarantees at-least-once delivery via a PUBLISH/PUBACK exchange but can deliver duplicates, requiring idempotent consumers. QoS 2 guarantees exactly-once delivery through a four-packet handshake (PUBLISH, PUBREC, PUBREL, PUBCOMP), at the cost of two full round-trips, reserved for mission-critical commands like opening a security gate. Developers tuning IoT reliability trade-offs can keep protocol notes like these handy on daily.dev."}},{"@type":"Question","name":"How do MQTT 5.0 shared subscriptions help scale backend consumers?","acceptedAnswer":{"@type":"Answer","text":"Shared subscriptions, introduced in MQTT version 5.0, let multiple backend workers subscribe under a '$share/\u003cgroup-name\u003e/\u003ctopic-filter\u003e' prefix so the broker round-robins or load-balances each incoming message to only one worker in the group instead of broadcasting it to all of them. This mirrors Kafka consumer groups and lets teams scale horizontally, for example spinning up ten more containers when traffic grows from 1,000 to 1,000,000 cars, without adding an external Kafka or RabbitMQ layer. Engineers scaling MQTT ingestion pipelines can track protocol-level patterns like this via daily.dev."}}]}
```

