welcome back to the mqtt essential series in this part of the series we will talk about the main features and the characteristics of mqtt and we will see why it is such a powerful protocol for everything related to the internet of things first of all, mqtt is an internet of things messaging protocol, it is built upon tcp ip, it has minimal overhead it's simple and it's designed for reliable communication over unreliable channels and if I think about it, many internet of things scenarios have bad connectivity where you have for example wi-fi or a mobile network where communication is sometimes pretty hard and you have a lot of interruptions so it could be for example if you're building a car that if you drive through tunnels that your user and your device will lose connectivity frequently and mqtt is really built for these kind of scenarios and it's super simple to implement it's super simple to use and it uses the best technologies the internet is also built upon like tcp ip so when we look at the characteristics of mqtt we have multiple characteristics which make it really really useful for iot number one it's binary. binary is extremely important because the internet of humans is built upon text html for example and http these are text-based protocols. very good for humans but for a machine text-based protocols are not not as suitable. binary protocols like mqtt are built for machines and are super efficient which brings me to the second characteristic it's efficient it was built around maximum efficiency so the smallest mqtt packet actually has two bytes so it's really really efficient on the wire it's bi-directional so as soon as you have a connection from your device to the cloud you can send data from device to cloud but you can also send data back from cloud to device the fourth part part of the characteristics is it's data agnostic data agnosticity means the protocol does not care what you're sending over it you can send like xml files, json files you can send your own custom data format you you need for your application or you can just use things like google protocol buffers and even users are using this for sending pictures or sometimes even video fragments over mqtt and the fifth characteristic is it's really really scalable so here at hivemq we have customers who connect more than 10 million devices over the same installation it's built upon push communication which means you really have the lowest latency you can you can have as soon as a device sends data to the cloud to the broker which we'll cover in a later video this software will push data to all devices who need the data so there are use cases where we talk about millisecond latency from device to device over the internet which is really great and last but not least mqtt is built for constrained devices which means if you have not a lot of computing power and you're very restricted with memory you can still use mqtt and in fact there are libraries out there, even for arduino and but of course also libraries out there for python, for java, for c, for c sharp and also newer languages like go and rust so this is really great because all of the characteristics make it so suitable for iot and as i said it's built upon tcp and this is huge and and let let us look into this a bit more closely mqtt requires tcp and this is great most of the internet protocols we have today run on top of tcp and for mqtt the usual stack is we have ip we have tcp and then mqtt on top of it mqtt uses persistent tcp connections so as soon as a connection is established from device to cloud the connection will be there and will be used here mqtt has also built in a heartbeat mechanism on top of tcp so even if a tcp connection breaks for some reason and you have a so-called half open socket problem where either the server or the device doesn't recognize that the tcp connection isn't available anymore mqtt has a detection mechanism called heartbeat but we will cover this in detail and what is really great is you can use tls which is the security transport layer on top on of mqtt so you can use tcp tls and then mqtt so you also get an encrypted connection you can reuse all the state-of-the-art libraries like OpenSSL together with mqtt and people are wondering why do we require tcp it's pretty simple because tcp already guarantees a lot of things mqtt builds upon and so it can be super efficient on the wire mqtt builds up on tcp because tcp guarantees that packets over the internet are transferred reliable ordered and error checked and mqtt leverages this fact and so it's super efficient and super tiny so now we have talked about the characteristics and now it's time in the next video to talk about how mqtt actually works what does this publish subscribe everybody is talking about and how you can apply this to you so stay tuned also don't forget to subscribe below we will release one video each week so we have the mqtt monday so each monday you get a fresh video into your inbox so don't forget to subscribe and see you in the next video