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

Manual Ack confirmation cannot meet expectations #1023

Open
1 of 3 tasks
mpv945 opened this issue Nov 22, 2023 · 2 comments
Open
1 of 3 tasks

Manual Ack confirmation cannot meet expectations #1023

mpv945 opened this issue Nov 22, 2023 · 2 comments

Comments

@mpv945
Copy link

mpv945 commented Nov 22, 2023

  • Bug exists Release Version 1.2.5 ( Master Branch)
  • Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
  • Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)

"I tried to set manual Ack in the MQTT client (Client.setManualAcks), and set the callback function deliveryComplete before publish handling to process the ack confirmation messages. Before subscribing to subscribe("test/#", 2), I also set the Callback function, messageArrived to receive data, and let the thread wait 30 seconds, manually confirm ack (Client.messageArrivedComplete(mqttMessage.getId(), 1);). However, in my final test, when the publishing is completed and the receiving end finishes printing the data, deliveryComplete has received the completion confirmation."

In summary, you:

Enabled manual ack in MQTT client using setManualAcks()
Set callback deliveryComplete to handle ACKs
Set callback messageArrived to receive data
Wait 30 seconds in messageArrived before manually acking
But observed that deliveryComplete gets called immediately after data is printed, not waiting 30 seconds.
Please let me know if you need any clarification or have additional questions!

@freyssin
Copy link

This issue appears to correlate with this precedent (#994) which included a fix (#995).

@whizyrel
Copy link

whizyrel commented Aug 1, 2024

Hello guys, great job here but this issue is still persistent with v5 1.2.5.
I have read #994, and #1023, it does not happen to have a fix.
I have submitted this issue #1054.

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

No branches or pull requests

3 participants