Open
Conversation
… used. We changed our internal PublishReturn constructor which required changes
bretambrose
reviewed
Mar 16, 2026
src/main/java/software/amazon/awssdk/crt/mqtt5/Mqtt5Client.java
Outdated
Show resolved
Hide resolved
src/main/java/software/amazon/awssdk/crt/mqtt5/PublishReturn.java
Outdated
Show resolved
Hide resolved
…heck if control was taken
bretambrose
reviewed
Mar 25, 2026
sfod
reviewed
Apr 7, 2026
src/main/java/software/amazon/awssdk/crt/mqtt5/Mqtt5PublishAcknowledgementControlHandle.java
Outdated
Show resolved
Hide resolved
src/main/java/software/amazon/awssdk/crt/mqtt5/Mqtt5PublishAcknowledgementControlHandle.java
Outdated
Show resolved
Hide resolved
bretambrose
reviewed
Apr 9, 2026
| aws_jni_check_and_clear_exception(env); /* To hide JNI warning */ | ||
| } | ||
|
|
||
| /* |
Contributor
There was a problem hiding this comment.
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()) { |
Contributor
There was a problem hiding this comment.
Just seems like it would be easier/simpler to
- Return null rather than throw an exception
- Don't bother with the thread id anything, remove controlAcquired, remove invalidate
- Call this method from native after invoking the publish call back and take a non-null return value to mean that you should invoke
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.