Adopt Paho MQTT v2 callbacks - #1259
Draft
Carter Tinney (cartertinney) wants to merge 1 commit into
Draft
Conversation
Carter Tinney (cartertinney)
force-pushed
the
ct/paho-mqtt-v2
branch
4 times, most recently
from
September 1, 2026 21:26
12156e5 to
5548931
Compare
Carter Tinney (cartertinney)
marked this pull request as draft
September 1, 2026 21:54
Migrate transport callbacks to Paho's version 2 API and classify connection and disconnect reasons by their documented semantics. Propagate broker-rejected SUBACKs through operation tracking, including early acknowledgements, and leave reconnect timing to the SDK. Remove obsolete reconnect-delay and private thread workarounds now that Paho 2.1 is required. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Carter Tinney (cartertinney)
force-pushed
the
ct/paho-mqtt-v2
branch
from
September 2, 2026 19:57
5548931 to
192b747
Compare
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.
Checklist
Reference/Link to the issue solved with this PR (if any)
None.
Description of the problem
The MQTT transport opted into deprecated Paho callback API v1, producing a deprecation warning for customers on Paho 2.x. It also deferred Paho reconnects with an arbitrary two-hour delay, wrote to the private
_threadfield, and treated every successfulsubscribe()call as eventual subscription success even when the broker rejected the SUBACK.Description of the solution
ReasonCodeobjects by documented semantic names while preserving existing SDK exception classification.ProtocolClientError; retain completion errors inOperationManagerwhen an ACK races ahead of operation establishment.reconnect_on_failure=False, remove the reconnect-delay workaround, and rely on Paho 2.1 callback-safeloop_stop()and_thread_maincleanup instead of assigning_threaddirectly.paho-mqtt>=2.1.0,<3.0.0and updateuv.lock.Validation
git diff --checkpassed