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

Provide more control over sending of acknowledgements #120

Open
sfitts opened this issue Feb 6, 2019 · 0 comments
Open

Provide more control over sending of acknowledgements #120

sfitts opened this issue Feb 6, 2019 · 0 comments

Comments

@sfitts
Copy link

sfitts commented Feb 6, 2019

Vertx-MQTT version 3.6.2

Currently the general pattern for this client is to send all of the acknowledgements prior to the invocation of the registered publish handler. Unfortunately this means that if there is a failure after the ack is sent, but before the handler completes the Vert.x application using this API may not have had a chance to completely do work associating with fully accepting the message. For example, in our application we provide the option to persist the message (on disk), but currently we can't guarantee that if this fails to occur then the message will be redelivered (since the MQTT server will already have received the ack).

For starters it seems to me that the publish handler should be called prior to the acknowledgement. This would allow clients with synchronous work to perform that work prior to the sending of the ack.
However, in our case, since the work we need to do is asynchronous even that is insufficient (unless we block the handler, which we obviously don't want to do). So for our purposes we would prefer an option in the API which lets us control the sending of the acks so we can make sure they aren't sent until all the necessary work is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant