Azure / azure-iot-sdk-node

A Node.js SDK for connecting devices to Microsoft Azure IoT services
https://docs.microsoft.com/en-us/azure/iot-hub/
Other
261 stars 226 forks source link

[IOT HUB message twin change events routing to Event hub] consumer receives full desired/reported properties on change of a single desired/reported property field on cloud/device #1192

Closed amit12cool closed 1 year ago

amit12cool commented 1 year ago

Describe the bug I have a event hub consumer in typescript with blob check point store. On changing or adding a new property in desired twin from cloud I get the full desired property object on my event hub consumer client.

For example:-

Lets say we add test key in desired property from cloud.

desired: {
"test":"123", // this is added
"test2": "456"
}

The event received on event hub consumer client is as below:-

desired: {
"test":"123",
"test2": "456"
}

To Reproduce Steps to reproduce the behavior:

  1. Subscribe to twin change events from iot hub to event hub endpoint.
  2. Change desired property of a device in cloud.
  3. Observe full device desired properties event is received on the event hub consumer client.

Expected behavior Only the changed desired property data should be received in the vent hub consumer client event i.e.

desired: {
  "test":"123",
}

Refer issue filled on event hub repo Here which guided me to file this issue in this repo.

vishnureddy17 commented 1 year ago

Hi @amit12cool. Unfortunately, this is a different repository from the one you were guided to. I think you're looking for this one

Before you open the issue there, I suggest trying to set the desired properties in Azure Portal rather than using the azure-iothub package. If you see the same unexpected behavior when setting them through the portal, it's probably not an SDK issue and should be raised to the service itself.

I'm closing this since it's not related to this repo, but feel free to ask for any clarification in this issue still.