question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot access IOT specific message properties in functions V2

See original GitHub issue

In functions V1, a JS function with an eventhub trigger that was wired to an IOT hub would see a bunch of IOT specific metadata:

bindingData:
    …
    "systemPropertiesArray": [
      {
        "iothub-connection-device-id": "miye-device0",
        "iothub-connection-auth-method": "{\"scope\":\"device\",\"type\":\"sas\",\"issuer\":\"iothub\",\"acceptingIpFilterRule\":null}",
        "iothub-connection-auth-generation-id": "636640121350566756",
        "iothub-enqueuedtime": "2018-12-13T14:42:43.358Z",
        "iothub-message-source": "Telemetry",
        "x-opt-sequence-number": 6127,
        "x-opt-offset": "3015760",
        "x-opt-enqueued-time": "2018-12-13T14:42:43.403Z",
        "enqueuedTimeUtc": "2018-12-13T14:42:43.403Z",
        "sequenceNumber": 6127,
        "offset": "3015760"
      }
    ],

In V2, this metadata is not accessible:

bindingData:
   …
  "systemPropertiesArray": [
      {
        "SequenceNumber": 6128,
        "Offset": "3016216",
        "PartitionKey": null,
        "EnqueuedTimeUtc": "2018-12-13T14:55:43.94Z"
      }
    ],
   …

Some testing with the Event Hubs .NET Standard SDK indicates that this is not due to a change in event hubs SDK behavior and its most likely that these properties are somehow filtered out/hidden by functions. Further investigation is required.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sonali92jaincommented, May 26, 2019

Fix is released to functions and webjobs sdk : https://github.com/Azure/azure-webjobs-sdk/releases/tag/v3.0.5 .

Is this fix still working? "systemPropertiesArray " is still coming as undefined

2reactions
stefannilssoncommented, Feb 7, 2019

When can we expect a fix? It’s a security issue for us since we cannot in a secure manner identify the sending device id.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IoT Hub message routing query syntax - Azure
System properties are added for all users and identify content of the message. Users can selectively add application properties to the message.
Read more >
Azure IoT Edge route message between modules
1 Answer. The custom message properties added to the message in the ModbusClient module are not propagated to the IdentityTranslation module, ...
Read more >
Troubleshoot Cloud Functions
Cloud Functions deployment can fail if the entry point to your code, that is, the exported function name, is not specified correctly. The...
Read more >
Functions - AWS IoT Core
The function returns NULL if the string cannot be decoded. This function supports decoding base64-encoded strings and Protocol Buffer (protobuf) message format.
Read more >
What is IoT (Internet of Things) and How Does it Work?
Enables access to information from anywhere at any time on any device. Improves communication between connected electronic devices. Enables the transfer of data ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found