-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide control over PUBACK to the client #141
Comments
Could someone explain what would be the changes (sources files) that are necessary to avoid auto PUBACK and send it explicitly? |
Looks like this is possible with |
In my mind, the biggest problem with this is keeping compliant with the MQTT spec and making sure the user understands the implications. First (from the latest v5 spec):
So the library would need to track the order that messages were received (which is not necessarily the numerical value of the message ID), and then hold any out-of-order ACKs and then make sure that they were sent back in the proper order. Any withheld ACK withheld by the application would stop all further ACKs. If you disconnect at that point, the ACKs from all the additional messages would have never reached the server, and on the next reconnect (assuming a persistent session) all the messages that the app thought it had ACK'ed would be re-transmit by the server. The library would have to keep the unsent ACKs as part of its session state and intercept those messages, or just pass them to the app to deal with. In addition, MQTT v5 now explicitly limits re-sending messages to reconnects:
(Emphasis added). There is no way, for example like AMQP, to to NAK a message to requeue it. |
Would it be possible to let the (async) client control when the
PUBACK
forQOS1
is send and to allow the application to call ack with a message-id as explicit acknowledgements once it safely handled the message?It is a similar ask like paho.mqtt.python#554 but for the rust crate.
Maybe it is this already possible but I didn't saw it?
The text was updated successfully, but these errors were encountered: