Closed petersilva closed 7 months ago
@ralight not trying to be pushy... but you were very helpful with my last PR (#554) I thought a mild poke might be reasonable ?
@aks @cclauss this PR is actually one I care about... nobody seems to be looking at it. I added the closes magic phrase once I learned it from the other PR.
@BBBSnowball @HaraldGustafsson Does this look like it solves the problem? Perhaps try out the branch and confirm if it works for you?
@PierreF Ping – you recently closed #348, mind taking a look at this?
all good improvments. Thanks @PierreF !
Thank for your contribution.
Thanks! I think a lot of people are helped by this new function. I know committters on this repo are overloaded, but it isn't obvious how to help. If committers want some help, I would be willing, but I don't see how to get sufficient permission to be helpful.
The existing python library acknowledges all messages received after calling the on_message() callback configured by the application. This PR adds manual_acks=False as an argument to client.py/init() function. When manual_acks=True, the application must acknowledge receipt of every message using the newly created ack(mid,qos) entry point.
This PR addresses issue #348 to allow applications to delay acknowledgement until it has completely received it. There was a first PR (#554) submitted two years ago. and got some great feeback from it:
After much too and fro, it was fairly clear that the library cannot be responsible for ordering. Then it occurred to me, that the Java implementation exists, and the equivalent functionality has been present for a number of years, and so chances are that it is doing "the right thing" tm.
So this PR uses the java implementation as a model, and slavishly implements the same thing in Python.
To illustrate the relationship to Java implementation, we can compare some tidbits:
So in python we have:
vs. Java:
There is a need for an implementation of a call to be used by the library user to actually send the acknowledgements. we can compare code here also:
python:
versus Java:
In the java, there was an existing messageArrivedCompleted entry point to adjust. In python, nothing similar was obvious, so modified _handrel which would only apply in QoS==2... to suppress sending of pubcomp when manual_acks is active.