Replies: 12 comments
Which twin message are you referring to here? A reported property update message? |
|
Oh, sorry. I was referring to the reported property messages. |
|
Okay, just wanted to double check. Thanks for the clarification. A good example of using device twin can be found in this sample. In it, the device client provides a callback (deviceTwinStatusCallback) to the startDeviceTwin(...) call that will be fired each time a twin message was successfully sent, including reported property messages. Note that it does also fire when the first twin subscription message is sent as well. |
|
@MMaiero did you have any other questions on this topic? If not, I will close this issue |
|
Hi @timtay-microsoft, Don't know if it is clear what I mean |
|
When you receive the onProperty callback, that represents IotHub accepting your reported property update. You don't really need to check the version here, or assign any version when sending subsequent reported property updates. That version is just a counter maintained on the hub side that tracks how many updates the twin has had. Does that make sense? |
|
If I'm sending twin updates as reported properties one after the other, maybe in a problematic environment like using a 3G connection, how do I know that all my updates got received from the cloud. This is actually possible with telemetry message and not really for twin properties. Isn't that a little bit asymmetric? Thanks |
|
The reported properties callback should be fired each time after the IoT Hub acknowledges receiving a reported properties update. You will know if your hub never received your reported property update if you never receive the callback corresponding to that property update. |
|
Hi @timtay-microsoft thank you for your response. Am I in the right path? Thanks |
|
By the way, I have tried to mockup what I originally intended, just to give you an idea. Thanks |
|
After taking another look at this issue, here is where the SDK stands right now. For sending a reported property, there is no way for a user to know when that reported property was acknowledged by the service. I consider this a gap in our SDK, as you are right to expect some way to know when these messages get ack'd. This may take a bit of an overhaul to fix without breaking existing users, but we'll look into it |
|
Hi @timtay-microsoft, first of all thank you for the update. Thanks again |
Uh oh!
There was an error while loading. Please reload this page.
OS and version used: Raspbian Buster
Java runtime used: openjdk version "1.8.0_181"
SDK version used: 0.22.0
iot-device-client version 1.16.0
Description of the issue:
In our context, we would like to get a confirmation that the Device Twin message has been received by the cloud platform, just like for the plain telemetry messages. I see that the APIs provide a way to get notification of the property version, but I am not able to get a notification that the whole massage has been received. Is it possible to achieve that result with the current API?
Code sample exhibiting the issue:
Console log of the issue:
Need Support?
All reactions