eclipse-paho / paho.mqtt.golang

Other
2.77k stars 534 forks source link

Any way to retry Publish messages, when QOS is 1 #652

Closed Kushagra0409 closed 10 months ago

Kushagra0409 commented 1 year ago

As it has been asked in earlier issues as well, although the library does not support mqtt v5.0, it only retries unacknowledged/queued messages upon re-connection with the broker( Unlike other mqttv3/3.11 clients). Unfortunately, I have a use case for retrying the messages repeatedly, which this library does not support.

Hence, I want to confirm that this is still, as of this date, intended behavior by the author, furthermore any guidance on how to enable this behavior would also be highly appreciated.

MattBrittan commented 1 year ago

Please see my response to previous issue (and my fairly detailed stack overflow answer). Nothing has changed since that response.

Unlike other mqttv3/3.11 clients

None of the clients I use support this.

I have a use case

If you have a use case then it would be useful to provide details. MQTT requires a "ordered, lossless, bi-directional connection" so any loss of ACK's points to a connection that does not meet this requirement, or an issue with the broker you are connecting to.,

MattBrittan commented 10 months ago

I'm going to close this because it's not a feature I can see being added to this library (it's something that other libraries/brokers have removed) and no further details have been provided. The only situation where I can see this being useful is when either the network connection does not provide a "ordered, lossless, bi-directional connection" or the server is non-compliant; as such it does not seem a worthwhile change (especially since MQTT v5 specifically prohibits this).