Switch to actually maintained thingsboard pubsubclient
Our MQTT library of choice is without a maintainer and hasn't been updated in 4 years. Pretty depressing thread: https://github.com/knolleary/pubsubclient/issues/1045
Thingsboard has taken up the most involved fork of this and seems to have already integrated some good changes, even as recent as 2 weeks ago.
Did not work out of the box. Marking as draft :-(
I read the background and it does look like this is the one to move to
https://github.com/thingsboard/pubsubclient/releases/tag/v2.11.0 fixed an issue with sending the credentials in the initial connection. Maybe this works now? It passed all the unit tests from #5724 and seems to be working on my heltec-v3 with my local MQTT server.
I'll send them a PR and see if we can make some of the methods virtual, for use in those tests.
thingsboard/pubsubclient has been updated to include @esev's changes :tada:
https://github.com/thingsboard/pubsubclient/compare/v2.11.0...v2.12.1