![developer6 | Embarcadero RAD Studio Delphi C++Builder Blogs](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/08/developer6.jpg?resize=1140%2C694&ssl=1)
MQTT stands for MQ Telemetry Transport and it is a specification for a publish-subscribe protocol for communication between devices.
When we are talking about Lightweight and Efficient, MQTT Protocol is a very good example. MQTT clients are very small, require minimal resources so can be used on small microcontrollers. MQTT message headers are small to optimize network bandwidth.
![server | Embarcadero RAD Studio Delphi C++Builder Blogs server](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/11/server-4137685.png?resize=750%2C406&ssl=1)
Another very important point is the Reliability of message delivery for many IoT use cases. This is why MQTT has 3 defined quality of service levels: 0 – at most once, 1- at least once, 2 – exactly once.
MQTT also provides Bi-directional Communications. To be more specific it allows for messaging between device to cloud and cloud to device. This makes for easy broadcasting messages to groups of things.
Supporting Unreliable Networks is tough. Many IoT devices connect over unreliable cellular networks. MQTT’s support for persistent sessions reduces the time to reconnect the client with the broker.
Another important feature of MQTT is scaling to Millions of Things. It can scale to connect with millions of IoT devices.
![MQTTSchemaEN | Embarcadero RAD Studio Delphi C++Builder Blogs mqtt schema en](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/11/MQTT_Schema_EN-4811768.jpg?resize=750%2C383&ssl=1)
With the best Security enabled, MQTT makes it easy to encrypt messages using TLS and authenticate clients using modern authentication protocols, such as OAuth.
If you want to try the Delphi MQTT library, please follow the link below:
https://github.com/pjde/delphi-mqtt
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition
The component is not prepared for TLS treatment.
Ah, well spotted, the linked component does indeed not currently implement TLS. I think the author meant “TLS can be used with the MQTT protocol”. Both TMS (https://www.tmssoftware.com/site/tips.asp?s=faq&show=989) and Esegece(https://www.esegece.com/websockets/protocols/mqtt)components do have the ability to use TLS.
Verdade, quebrei muito a cabeça tentando usar o Client sugerido pelo autor da postagem Konstantin Tomov conectado ao Broker Mosquitto, porque sempre havia um erro de conexão com Broker Mosquitto, talvez haja alguma configuração no arquivo .conf do broker Mosquito que desative essa questão de TLS.
Já o componente utilizando com o Broker e Client do mesmo pocote de componente dessa sugestão são muitos bons, Acredito que o Broker sugerido não ser tão parrudo quanto o Broker Mosquitto, digo isso com os teste de aplicações que fiz para minhas automações com Arduino e ESP8266.
o Client MQTT da TMS é muito bom e conecta ao Mosquitto. talvez pelo suporte do TLS. Pena que a versão trial tem uma limitação de tempo de uso.
— automatic translation to English —
True, I broke my head a lot trying to use the Client suggested by the author of the post Konstantin Tomov connected to broker Mosquitto, because there was always a connection error with Broker Mosquitto, maybe there is some configuration in the mosquito broker’s .conf file that disables this TLS issue.
Already the component using with the Broker and Client of the same component pocote of this suggestion are many good, I believe that the Suggested Broker not be as parrudo as the Broker Mosquitto, I say this with the testing of applications I did for my automations with Arduino and ESP8266.
TMS’s MQTT Client is very good and connects to Mosquitto. perhaps by TLS support. Too bad the trial version has a time limitation of use.
I think the point of the TMS trial is for you to be able to test to see if it will do what you want – before buying it?
All I can say is that when I used the TMS MQTT client in a demo it worked correctly, and I found it easy to use. 🙂
Anderson: Eu tenho usado o TMS MQTT em projetos tanto para Windows como para Android e funciona muito bem e é muito simples de usar. Conecta sem problemas com qualquer broker. É verdade que a trial version tem um tempo muito curto de uso, mas para protótipos está bem. Pode ver alguns desses projetos em https://github.com/quini27
—-
Editor’s English translation (by Google translate): Anderson: I have used the TMS MQTT in projects for both Windows and Android and it works very well and is very simple to use. Connect without problems with any broker. It is true that the trial version has a very short time of use, but for prototypes it is fine. You can see some of these projects at https://github.com/quini27
I am trying to use this unit, but the unit uses blcksock.
I also tried to download blcksock.pas (do not know the owner) but the unit I found generates many compiler error.
Any idea? I am currently lock.
Hi Marco. I’ve not looked at this in-depth but I see that the example linked uses ICS from Overbyte: http://wiki.overbyte.eu/wiki/index.php/ICS_Download
Blcksock is a common name for blocking sockets. Without checking, it might be part of ICS (which is a free and well-written library) but it could also be part of Synapse: http://synapse.ararat.cz/doku.php/download.
If you haven’t downloaded the ICS components yet I’d suggest trying that first.
Is everything included in this library to run one of the demos on Delphi 7? I’ve tried and I get errors on .dcu files not being found…
Hi Gregg, you don’t mention specifically which DCUs it said were missing but I do notice that the example app uses VirtualTrees which is the Virtual Tree View component and that may be what it’s saying is missing. I know there used to be a version of VirtualTrees available for Delphi 7. The GitHub repo is here: https://github.com/JAM-Software/Virtual-TreeView. I do notice, however, that although the source for the examples doesn’t specifically use anything which would not work with Delphi 7 the project files are actually DPROJ files for much later versions with no .DPR equivalents so there might be some work required there.
Hi, in my mobile project I used TMS MQTT but it has some multithreaded problems and login is sometimes very slow.
I wanted to evaluate this library but I saw that it uses ICS and I don’t know if it can be good for mobile: has anyone already used it?