256dpi / arduino-mqtt

MQTT library for Arduino
MIT License
1.01k stars 230 forks source link

Possibility to serialize messages directly to server? #298

Closed dloeckx closed 10 months ago

dloeckx commented 1 year ago

I don't think it is possible to serialize messages directly to server? What would be a good approach to implement this?

E.g., with https://pubsubclient.knolleary.net/api you can call beginPublish, send your message using write, and then call endPublish to finish up.

I am looking for this feature to be able to send (relatively) large json messages over mqtt, as in https://github.com/dawidchyrzynski/arduino-home-assistant/blob/0fc32a5bad861ca76767ff13187f8afabcc4f9a0/src/device-types/HABaseDeviceType.cpp#L99 .

256dpi commented 10 months ago

We're tracking this effort in #145. I'm closing this for now.