Skip to content
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

Allow acking messages without a reference to publish #609

Open
einarmo opened this issue Apr 19, 2023 · 0 comments
Open

Allow acking messages without a reference to publish #609

einarmo opened this issue Apr 19, 2023 · 0 comments
Labels
stale Not moving forward; blocked

Comments

@einarmo
Copy link
Contributor

einarmo commented Apr 19, 2023

The current system requires a reference to a Publish packet in order to send an ack for that packet. This is usually fine, but in our case we receive and process messages asynchronously, so we would like to be able to ack a message on a callback after processing it, potentially in a batch together with other messages. We could keep the message, but that seems unnecessary. You don't need the full message to send an ack, and the payload itself is probably better freed by that point.

A solution could be to either expose an ack_by_id(pkid, qos), or making a get_ack_packet(&Publish) -> Ack, and send_ack_packet(Ack), where Ack is some thin wrapper around Option<Request>.

I'd be happy to contribute this if it sounds reasonable.

@stale stale bot added the stale Not moving forward; blocked label May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Not moving forward; blocked
Projects
None yet
Development

No branches or pull requests

1 participant