# MQTT

Protocols · `MQTT` · verification: source checked

MQTT is a lightweight publish/subscribe messaging protocol. Clients publish messages to named topics on a broker, and the broker forwards each message to every client subscribed to a matching topic. Sparkplug B is a specification layered on top of MQTT for industrial payloads.

## Specification

| Property | Value |
|---|---|
| Transports | tcp, websocket |
| Architecture | publish subscribe |
| Encoding | binary |
| Standard body | OASIS |
| Standard ref | MQTT Version 5.0 |

### Default ports

| Port | Transport | Secure | Purpose |
|---|---|---|---|
| 1883 | tcp | false | MQTT |
| 8883 | tcp | true | MQTT over TLS |

## Connected

- Related: [MQTT Sparkplug B](https://machineschema.com/protocol/mqtt-sparkplug-b.md), [MQTT-SN v1.2](https://machineschema.com/protocol/mqtt-sn.md), [MTConnect](https://machineschema.com/protocol/mtconnect.md), [MQTT Sparkplug B](https://machineschema.com/protocol/mqtt-sparkplug-b.md), [MTConnect](https://machineschema.com/protocol/mtconnect.md)
- Supported by: [AutomationDirect C-more CM5-T12W](https://machineschema.com/hardware/automationdirect-cm5-t12w.md), [Beckhoff CX7000](https://machineschema.com/hardware/beckhoff-cx7000.md), [Beckhoff CX7031](https://machineschema.com/hardware/beckhoff-cx7031.md), [Beckhoff CX7050](https://machineschema.com/hardware/beckhoff-cx7050.md), [Beckhoff CX7051](https://machineschema.com/hardware/beckhoff-cx7051.md), [Beckhoff CX7080](https://machineschema.com/hardware/beckhoff-cx7080.md), [Beckhoff CX7291](https://machineschema.com/hardware/beckhoff-cx7291.md), [Beckhoff CX8110](https://machineschema.com/hardware/beckhoff-cx8110.md), [Beckhoff CX8180](https://machineschema.com/hardware/beckhoff-cx8180.md), [Beckhoff CX8190](https://machineschema.com/hardware/beckhoff-cx8190.md), [Beckhoff CX8191](https://machineschema.com/hardware/beckhoff-cx8191.md), [DMG MORI LASERTEC 30 SLM 3rd Generation](https://machineschema.com/hardware/dmg-mori-lasertec-30-slm-3rd-generation.md), [FANUC R-30iB Plus](https://machineschema.com/controller/fanuc-r-30ib-plus.md), [FANUC R-50iA](https://machineschema.com/controller/fanuc-r-50ia.md)

## Safety

- Port 1883 is unencrypted. Use TLS on port 8883 and require client authentication on any broker reachable from outside the plant network.

## Study notes

- Quality of Service levels: 0 delivers at most once, 1 at least once, 2 exactly once.
- Topic filters use + for one level and # for all remaining levels.

## Sources

1. [IANA Service Name and Transport Protocol Port Number Registry (mqtt, secure-mqtt)](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=mqtt) (accessed 2026-10-25)
2. [MQTT Version 5.0, OASIS Standard](https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html) (accessed 2026-10-25)

---

Source page: https://machineschema.com/protocol/mqtt  
JSON: https://machineschema.com/protocol/mqtt.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
