Manual Publish Acknowledgement Now Available (MQTT5) #685
sbSteveK
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We're excited to announce that Manual Publish Acknowledgement is now available in the AWS IoT Device SDK
What is Manual Publish Acknowledgement?
When using MQTT5 with QoS 1 (at-least-once delivery), the broker expects your client to send a PUBACK (publish acknowledgement) packet after receiving each message. By default, the MQTT5 client automatically sends this PUBACK immediately after your message-received callback returns.
Manual Publish Acknowledgement gives you explicit control over when that PUBACK is sent. This means you can defer acknowledgement until your application has fully and durably processed the message. For example, after writing it to a database, forwarding it to a downstream service, or completing any other critical processing step. Only once you're confident the message has been handled should you send the PUBACK, ensuring the broker won't consider the message lost.
Why does this matter?
Without manual acknowledgement, there's a window where your application could receive a message, automatically acknowledge it, and then crash or fail before fully processing it. The broker would then consider the message delivered and would not resend it, potentially causing data loss.
With manual acknowledgement, you stay in control: the broker will continue to redeliver the message until you explicitly acknowledge it, giving you strong at-least-once processing guarantees end-to-end — not just at the network layer.
How to use it
The general pattern of the feature is:
For detailed instructions and code examples see the Manual Publish Acknowledgement section in the MQTT5 User Guide: MQTT5 User Guide — Manual Publish Acknowledgement
Beta Was this translation helpful? Give feedback.
All reactions