Skip to content

Manual PUBACK Control#970

Open
sbSteveK wants to merge 23 commits intomainfrom
manual-puback
Open

Manual PUBACK Control#970
sbSteveK wants to merge 23 commits intomainfrom
manual-puback

Conversation

@sbSteveK
Copy link
Copy Markdown
Contributor

@sbSteveK sbSteveK commented Mar 4, 2026

Bind manual puback
Opaque manual puback control handle

Tests for Manual Puback

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

* callback. If they did NOT, auto-invoke the PUBACK to avoid losing it.
*/
if (control_id != 0 && publish_packet_return_data != NULL) {
/* Invalidate the PublishReturn to prevent post-callback use */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not combine these two into a single atomic operation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combining them would conflate the two functions invalidateAfterCallback and wasControlAcquired into a singular one that handles both actions when they serve two distinct and clear purposes. It would reduce JNI calls by one but what's here feels cleaner. I'd rather stick with this unless we see some kind of material performance degradation. If Vera's perf work is in place, we should be able to see if it's costly enough but in normal MQTT use I don't see it as an issue.

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

Successfully merging this pull request may close these issues.

2 participants