<s>
MQTT	B-Application
(	O
originally	O
an	O
initialism	O
of	O
MQ	B-Application
Telemetry	I-Application
Transport	I-Application
)	O
is	O
a	O
lightweight	O
,	O
publish-subscribe	B-Operating_System
,	O
machine	O
to	O
machine	O
network	O
protocol	O
for	O
message	O
queue/message	O
queuing	O
service	O
.	O
</s>
<s>
It	O
is	O
designed	O
for	O
connections	O
with	O
remote	O
locations	O
that	O
have	O
devices	O
with	O
resource	O
constraints	O
or	O
limited	O
network	O
bandwidth	O
,	O
such	O
as	O
in	O
the	B-Operating_System
Internet	I-Operating_System
of	I-Operating_System
Things	I-Operating_System
(	O
IoT	B-Operating_System
)	O
.	O
</s>
<s>
It	O
must	O
run	O
over	O
a	O
transport	O
protocol	O
that	O
provides	O
ordered	O
,	O
lossless	B-Algorithm
,	O
bi-directional	O
connections	O
—	O
typically	O
,	O
TCP/IP	B-Protocol
.	O
</s>
<s>
Historically	O
,	O
the	O
"	O
MQ	O
"	O
in	O
"	O
MQTT	B-Application
"	O
came	O
from	O
the	O
IBM	B-Application
MQ	I-Application
(	O
then	O
'	O
MQSeries	B-Application
 '	O
)	O
product	O
line	O
,	O
where	O
it	O
stands	O
for	O
"	O
Message	B-Operating_System
Queue	I-Operating_System
"	O
.	O
</s>
<s>
However	O
,	O
the	O
protocol	O
provides	O
publish-and-subscribe	B-Operating_System
messaging	I-Operating_System
(	O
no	O
queues	O
,	O
in	O
spite	O
of	O
the	O
name	O
)	O
.	O
</s>
<s>
In	O
the	O
specification	O
opened	O
by	O
IBM	O
as	O
version	O
3.1	O
the	O
protocol	O
was	O
referred	O
to	O
as	O
"	O
MQ	B-Application
Telemetry	I-Application
Transport	I-Application
"	O
.	O
</s>
<s>
Subsequent	O
versions	O
released	O
by	O
OASIS	O
strictly	O
refers	O
to	O
the	O
protocol	O
as	O
just	O
"	O
MQTT	B-Application
"	O
,	O
although	O
the	O
technical	O
committee	O
itself	O
is	O
named	O
"	O
OASIS	O
Message	B-Application
Queuing	I-Application
Telemetry	I-Application
Transport	I-Application
Technical	O
Committee	O
"	O
.	O
</s>
<s>
Since	O
2013	O
,	O
"	O
MQTT	B-Application
"	O
does	O
not	O
stand	O
for	O
anything	O
.	O
</s>
<s>
In	O
2013	O
,	O
IBM	O
submitted	O
MQTT	B-Application
v3.1	O
to	O
the	O
OASIS	O
specification	O
body	O
with	O
a	O
charter	O
that	O
ensured	O
only	O
minor	O
changes	O
to	O
the	O
specification	O
could	O
be	O
accepted	O
.	O
</s>
<s>
A	O
more	O
substantial	O
upgrade	O
to	O
MQTT	B-Application
version	O
5	O
,	O
adding	O
several	O
new	O
features	O
,	O
was	O
released	O
on	O
March	O
7	O
,	O
2019	O
.	O
</s>
<s>
MQTT-SN	B-Application
(	O
MQTT	B-Application
for	O
Sensor	O
Networks	O
)	O
is	O
a	O
variation	O
of	O
the	O
main	O
protocol	O
aimed	O
at	O
battery-powered	O
embedded	O
devices	O
on	O
non-TCP/IP	O
networks	O
,	O
such	O
as	O
Zigbee	B-Protocol
.	O
</s>
<s>
The	O
MQTT	B-Application
protocol	I-Application
defines	O
two	O
types	O
of	O
network	O
entities	O
:	O
a	O
message	B-General_Concept
broker	I-General_Concept
and	O
a	O
number	O
of	O
clients	O
.	O
</s>
<s>
An	O
MQTT	B-Application
broker	O
is	O
a	O
server	O
that	O
receives	O
all	O
messages	O
from	O
the	O
clients	O
and	O
then	O
routes	O
the	O
messages	O
to	O
the	O
appropriate	O
destination	O
clients	O
.	O
</s>
<s>
An	O
MQTT	B-Application
client	O
is	O
any	O
device	O
(	O
from	O
a	O
micro	O
controller	O
up	O
to	O
a	O
fully-fledged	O
server	O
)	O
that	O
runs	O
an	O
MQTT	B-Application
library	O
and	O
connects	O
to	O
an	O
MQTT	B-Application
broker	O
over	O
a	O
network	O
.	O
</s>
<s>
A	O
retained	O
message	O
is	O
a	O
normal	O
MQTT	B-Application
message	O
with	O
the	O
retained	O
flag	O
set	O
to	O
true	O
.	O
</s>
<s>
A	O
minimal	O
MQTT	B-Application
control	O
message	O
can	O
be	O
as	O
little	O
as	O
two	O
bytes	O
of	O
data	O
.	O
</s>
<s>
MQTT	B-Application
relies	O
on	O
the	O
TCP	O
protocol	O
for	O
data	O
transmission	O
.	O
</s>
<s>
A	O
variant	O
,	O
MQTT-SN	B-Application
,	O
is	O
used	O
over	O
other	O
transports	O
such	O
as	O
UDP	O
or	O
Bluetooth	O
.	O
</s>
<s>
MQTT	B-Application
sends	O
connection	O
credentials	O
in	O
plain	O
text	O
format	O
and	O
does	O
not	O
include	O
any	O
measures	O
for	O
security	O
or	O
authentication	O
.	O
</s>
<s>
This	O
can	O
be	O
provided	O
by	O
using	O
TLS	B-Protocol
to	O
encrypt	O
and	O
protect	O
the	O
transferred	O
information	O
against	O
interception	O
,	O
modification	O
or	O
forgery	O
.	O
</s>
<s>
The	O
default	O
unencrypted	O
MQTT	B-Application
port	O
is	O
1883	O
.	O
</s>
<s>
The	O
MQTT	B-Application
broker	O
is	O
a	O
piece	O
of	O
software	O
running	O
on	O
a	O
computer	O
(	O
running	O
on-premises	O
or	O
in	O
the	O
cloud	O
)	O
,	O
and	O
could	O
be	O
self-built	O
or	O
hosted	O
by	O
a	O
third	O
party	O
.	O
</s>
<s>
MQTT	B-Application
clients	O
do	O
n't	O
use	O
a	O
direct	O
connection	O
address	O
of	O
the	O
intended	O
recipient	O
,	O
but	O
use	O
the	O
subject	O
line	O
called	O
"	O
Topic	O
"	O
.	O
</s>
<s>
the	O
devices	O
can	O
publish	O
sensor	O
data	O
and	O
still	O
be	O
able	O
to	O
receive	O
the	O
configuration	O
information	O
or	O
control	O
commands	O
(	O
MQTT	B-Application
is	O
a	O
bi-directional	O
communication	O
protocol	O
)	O
.	O
</s>
<s>
With	O
the	O
MQTT	B-Application
broker	O
architecture	O
,	O
the	O
client	O
devices	O
and	O
server	O
application	O
become	O
decoupled	O
.	O
</s>
<s>
MQTT	B-Application
,	O
if	O
configured	O
to	O
,	O
can	O
use	O
TLS	B-Protocol
encryption	I-Protocol
with	O
certificate	O
,	O
username	O
and	O
password	O
protected	O
connections	O
.	O
</s>
<s>
The	O
broker	O
can	O
support	O
both	O
standard	O
MQTT	B-Application
and	O
MQTT	B-Application
for	O
compliant	O
specifications	O
such	O
as	O
Sparkplug	O
.	O
</s>
<s>
The	O
main	O
advantages	O
of	O
MQTT	B-Application
broker	O
are	O
:	O
</s>
<s>
Waits	O
for	O
the	O
MQTT	B-Application
client	O
to	O
finish	O
any	O
work	O
it	O
must	O
do	O
,	O
and	O
for	O
the	O
TCP/IP	B-Protocol
session	O
to	O
disconnect	O
.	O
</s>
<s>
Returns	O
immediately	O
to	O
the	O
application	O
thread	O
after	O
passing	O
the	O
request	O
to	O
the	O
MQTT	B-Application
client	O
.	O
</s>
<s>
In	O
2019	O
,	O
OASIS	O
released	O
the	O
official	O
MQTT	B-Application
5.0	O
standard	O
.	O
</s>
<s>
This	O
field	O
does	O
not	O
affect	O
handling	O
of	O
the	O
underlying	O
TCP	O
data	O
transmissions	O
;	O
it	O
is	O
only	O
used	O
between	O
MQTT	B-Application
senders	O
and	O
receivers	O
.	O
</s>
<s>
Security	O
of	O
the	O
MQTT	B-Application
protocol	I-Application
was	O
compromised	O
in	O
2020	O
by	O
Italian	O
researchers	O
,	O
executing	O
Slow	O
DoS	O
Attacks	O
on	O
such	O
protocol	O
(	O
see	O
)	O
.	O
</s>
