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

add mosquitto_delay_puback option #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

linuxbasic
Copy link

@linuxbasic linuxbasic commented Dec 6, 2020

Signed-off-by: Linus Basig [email protected]
Signed-off-by: Fabrizio Lazzaretti [email protected]

Thank you for contributing your time to the Mosquitto project!

Before you go any further, please note that we cannot accept contributions if
you haven't signed the Eclipse Contributor Agreement.
If you aren't able to do that, or just don't want to, please describe your bug
fix/feature change in an issue. For simple bug fixes it is can be just as easy
for us to be told about the problem and then go fix it directly.

Then please check the following list of things we ask for in your pull request:

  • Have you signed the Eclipse Contributor Agreement, using the same email address as you used in your commits?
  • Do each of your commits have a "Signed-off-by" line, with the correct email address? Use "git commit -s" to generate this line for you.
  • If you are contributing a new feature, is your work based off the develop branch?
  • If you are contributing a bugfix, is your work based off the fixes branch?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run make test with your changes locally?

This PR adds a method mosquitto_delay_puback. After calling mosquitto_delay_puback the library will delay the PUBACK message required for QoS 1 message transfers until after the on_message callback returns.

This change ensures the message does not get lost if the client crashes during the processing of the message.

If the mosquitto_delay_puback is not called, the previous behavior (PUBACK before calling on_message) applies.

related issues:

My use-case is a messaging middleware that forwards the messages to other systems and we need to maintain the "At Least Once" delivery guarantee of QoS 1.

include/mosquitto.h Outdated Show resolved Hide resolved
include/mosquitto.h Outdated Show resolved Hide resolved
lib/options.c Outdated Show resolved Hide resolved
lib/linker.version Outdated Show resolved Hide resolved
lib/handle_publish.c Outdated Show resolved Hide resolved
@linuxbasic linuxbasic force-pushed the feat/delayed-puback branch 4 times, most recently from d275f90 to 7886aa8 Compare December 6, 2020 17:00
ChangeLog.txt Outdated Show resolved Hide resolved
@linuxbasic linuxbasic force-pushed the feat/delayed-puback branch 3 times, most recently from 86e16bc to 5de28da Compare December 6, 2020 17:16
lib/linker.version Outdated Show resolved Hide resolved
Signed-off-by: Linus Basig <[email protected]>
Co-authored-by: Fabrizio Lazzaretti <[email protected]>
Signed-off-by: Fabrizio Lazzaretti <[email protected]>
@linuxbasic linuxbasic force-pushed the feat/delayed-puback branch 2 times, most recently from 9f834df to feeca2b Compare December 27, 2020 12:34
Signed-off-by: Linus Basig <[email protected]>
Co-authored-by: Fabrizio Lazzaretti <[email protected]>
Signed-off-by: Fabrizio Lazzaretti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants