Skip to content

Manual PUBACK Control#970

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

Manual PUBACK Control#970
sbSteveK wants to merge 27 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.

aws_jni_check_and_clear_exception(env); /* To hide JNI warning */
}

/*
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 can't we just call acquire on the publish return object here rather than add all this additional state/calls?

* or called on a QoS 0 message.
*/
public synchronized Mqtt5PublishAcknowledgementControlHandle acquirePublishAcknowledgementControl() {
if (controlId == 0 || threadID != Thread.currentThread().getId()) {
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.

Just seems like it would be easier/simpler to

  1. Return null rather than throw an exception
  2. Don't bother with the thread id anything, remove controlAcquired, remove invalidate
  3. Call this method from native after invoking the publish call back and take a non-null return value to mean that you should invoke

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.

3 participants