Repository navigation
[C] mqttv5 twin: document that desired patches need twin_push.push_desired - #407
Merged
Ewerton Scaboro da Silva (ewertons) merged 2 commits intoOct 10, 2026
Merged
Conversation
Ewerton Scaboro da Silva (ewertons)
requested review from
Avishek (avishekpant) and
Maxim Semenov (maximsemenov80)
as code owners
October 10, 2026 06:56
Copilot started reviewing on behalf of
Ewerton Scaboro da Silva (ewertons)
October 10, 2026 06:56
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The documentation matches existing behavior, and targeted unit tests cover the clarified defaults and synchronization path.
0 open findings
What changed in this PR
Clarifies MQTT v5 twin delivery behavior when desired-property push is disabled.
Changes:
- Documents pull versus push delivery semantics.
- Corrects internal connection commentary.
- Adds unit coverage for defaults and GET-triggered synchronization.
| File | Description |
|---|---|
c/inc/azure/iot/az_iot_connection_client.h |
Documents twin push options. |
c/inc/azure/iot/mqttv5/az_iot_twin_client.h |
Clarifies desired-state delivery. |
c/src/mqttv5/twin_client.c |
Corrects connection comment. |
c/docs/connecting.md |
Adds twin push guidance. |
c/tests/unit/connection_client_test.c |
Tests default push settings. |
c/tests/unit/mqttv5_twin_client_test.c |
Tests GET-triggered snapshot retrieval. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Ewerton Scaboro da Silva (ewertons)
force-pushed
the
fix/mqttv5-twin-push-desired-docs
branch
from
October 10, 2026 07:13
ea5aa65 to
eca58b9
Compare
Copilot started reviewing on behalf of
Ewerton Scaboro da Silva (ewertons)
October 10, 2026 07:14
View session
Copilot started reviewing on behalf of
Ewerton Scaboro da Silva (ewertons)
October 10, 2026 07:20
View session
…sired Without push_desired (the default) the service sends no desired patches or version probes; desired changes made while connected are seen only on reconnect or after a twin GET. Correct the connection options, twin client and connecting docs accordingly, and add unit tests for the default and for a GET that shows desired ahead.
Ewerton Scaboro da Silva (ewertons)
force-pushed
the
fix/mqttv5-twin-push-desired-docs
branch
from
October 10, 2026 07:42
8eafdf0 to
b7acb36
Compare
Copilot started reviewing on behalf of
Ewerton Scaboro da Silva (ewertons)
October 10, 2026 07:43
View session
Ewerton Scaboro da Silva (ewertons)
left a comment
Contributor
Author
There was a problem hiding this comment.
Approved.
Ewerton Scaboro da Silva (ewertons)
deleted the
fix/mqttv5-twin-push-desired-docs
branch
October 10, 2026 07:48
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.

Problem
With
twin_push.push_desired = false(the default), the mqttv5 service sends no desired-property patches or version probes. Desired changes made while connected reach the device only on reconnect or after a twin GET. Thetwin_pushcomment, the mqttv5 twin client file doc and an internal comment implied patches arrive in either mode.Changes
az_iot_connection_client.h:twin_pushdoc states what each mode delivers. Default staysfalse.mqttv5/az_iot_twin_client.h: file doc states patches and probes requirepush_desired.src/mqttv5/twin_client.c:on_hub_connectedcomment corrected. No behavior change.docs/connecting.md:twin_pushrow in MQTT session options.options_default_leaves_twin_push_off,a_get_ahead_fetches_a_snapshot.Validation
Linux gcc Debug: build clean; ctest 38/38 suites pass.
Not included: live test of pull and push mode desired delivery (no mqttv5 twin e2e scenario exists yet).