adafruit / Adafruit_MQTT_Library

Arduino library for MQTT support
MIT License
571 stars 292 forks source link

Adds retain support for publishing messages #169

Closed Fapiko closed 1 year ago

Fapiko commented 4 years ago

This adds retains support to published messages. It should be backwards compatible with existing clients as it defaults to false if not supplied.

Solves #20 and #161

Paulie92 commented 3 years ago

Is there any example how to call this function in the code? unfortunately I have no idea how can I use it.

Thank you

trickkiste commented 2 years ago

When will this be merged? Seems all tests have passed and it is backward compatible, so what is the holdup? The feature is sorely needed!

Please merge!

ben-willmore commented 1 year ago

I made an up-to-date version of this which overloads the publish and publishPacket functions rather than using optional arguments:

https://github.com/ben-willmore/Adafruit_MQTT_Library/tree/retain-flag

brentru commented 1 year ago

@ben-willmore Are you interested in checking out a pull request against this library, I'll review it.

ben-willmore commented 1 year ago

@brentru Sure, have now done so -- #216

brentru commented 1 year ago

Resolved by https://github.com/adafruit/Adafruit_MQTT_Library/pull/216