Forum > General

Updated MQTT v2 client package somewhere?

(1/2) > >>

I am trying to find a package which will allow me to include MQTT transfers of IoT data into my Lazarus/FPC application.
I need it to be able to handle the protocol used by the latest mosquitto MQTT broker.

I have installed the mosquitto broker on a RaspberryPi4 and it got version as shown:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---mosquitto version 2.0.11mosquitto is an MQTT v5.0/v3.1.1/v3.1 broker.
Is there any way to make a subscribe/publish client with Lazarus (on Linux) using this broker?
What I have found by googling for it is not encouraging since it seems like what is available is quite old and apparently does not work properly nowadays with the updated protocol.
The Github pages shows code to be quite old too, like 5-6 years or more...

Any suggestions?

Please see, this is forum search for MQTT,54397.msg435050.html#msg435050

Thanks, I will check that and see if I get it running.
Not a package then?

Some are Delphi only, but most work with FPC/Lazarus:

I want to add my own implementation to that list:

It is very new (3 days at the time of this writing) and currently implements only user/pass authentication, no ssl (yet) and no QoS (yet).

It does not need any additional networking library and needs nothing installed in the IDE because it uses only TInetSocket from the SSockets unit. It implements protocol version 5. The license is LGPL v2 with static linking exception.

It can already connect, subscribe, publish, it supports the MQTT5 features "topic alias", "response-topic" and "correlation-data" and I am currently testing on Linux against mosquitto 2.0.x (the one that comes with the home assistant addon).

Edit: 17.11.22: SSL implemented
Edit: 18.11.22: client certificate authentication implemented
Edit: 22.11.22: QoS 1 and 2 implemented


[0] Message Index

[#] Next page

Go to full version