match new PR for python library. https://github.com/eclipse/paho.mqtt… #763
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix manual_ack support in sr3/moth/mqtt to reflect new PR (code used to support the previous paho PR, but it was never merged. I have closed that other PR now, hopefully this new one gets merged.)
Match the PR below: eclipse/paho.mqtt.python#753
The current python library acknowledges receipt of messages (in QoS=1 or 2) before calling the on_message(..) callback, and so leaves a vulnerability where messages may be acknowledged before they are properly received by the application.
The Java implementation behaves the same way by default, but has a manualAck mode boolean flag available to allow the application to take over responsibility should it choose to do so. There was a lot of discussion around the original PR, so created
this second one to be easier to accept ;-) it literally just brings the functionality existing in the Java implementation as-is to the python one.
I think a lot of people want this feature, it would be great to have it reviewed.
Two years ago, I submitted eclipse/paho.mqtt.python#554 to address the issue from 2018: eclipse/paho.mqtt.python#348 There was a lot of discussion,
but it never got merged.