docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License

    • Unity Live Systems Data
      • Installation
      • What's new
      • Upgrade guide
    • Get started
      • Take it further
    • Basic concepts
    • Configure your service
      • Add and configure user-supplied secrets
      • Associate 3D objects with source devices
      • Configure a facility device simulator
      • Configure data connectors
        • Device connectors
          • Azure IoT Hub device connector
          • Facility Simulator device connector
          • HTTP device connector
        • Telemetry connectors
          • Azure EventHub telemetry connector
    • Develop your application
      • Create environment settings
      • Create a services controller
      • Implement a telemetry history controller
    • Troubleshooting
    • Glossary
    • REST APIs

    Azure EventHub telemetry connector

    Use the Azure EventHub telemetry connector ("Unity.Connector.Telemetry.Azure.EventHub") to receive telemetry from an Azure EventHub endpoint.

    Behavior

    When invoked, the Azure EventHub telemetry connector subscribes to the Azure EventHub using the connection string specified in the EventHubConnectionStringSecretName user secret. The telemetry connector uses the default EventHub consumer group name unless otherwise specified in the EventHubConsumerGroupName property .

    Checkpoints are updated using Azure Storage. Checkpoints are configured using the connection string specified in the StorageConnectionStringSecretName user secret and the blob container name specified in the BlobContainerName property.

    Prerequisites

    Before you configure an Azure EventHub telemetry connector, you must first create and configure an Azure IoT Hub. By default, the IoT Hub is configured with an EventHub-compatible built-in endpoint. This built-in endpoint is a straightforward way to get started with the Azure EventHub telemetry connector.

    Copy the EventHub-compatible endpoint connection string:

    Endpoint=sb://iothub-ns-xxxxx.servicebus.windows.net/;SharedAccessKeyName=iothubowner;SharedAccessKey=xxxxxxxxxx=;EntityPath=my-iot-hub
    

    Additionally, you must create and configure an Azure Storage account for storing EventHub checkpoint entries. Copy the Azure Storage connection string:

    DefaultEndpointsProtocol=https;AccountName=mystorageaccountname;AccountKey=xxxxxxxxxx==;EndpointSuffix=core.windows.net
    

    Use the user secret endpoints in the Live Systems Data API to create user secrets that represent the EventHub and Azure Storage connection strings.

    The telemetry events sent to the Azure EventHub must conform to the JSON format outlined in the Models section.

    Configuration

    You configure the Azure EventHub telemetry connector using the Live Systems Data API.

    {
      "implementation": "Unity.Connector.Telemetry.Azure.IotHub.EventHub",
      "properties": {
        "EventHubConnectionStringSecretName": "user-secret_df9696b1-b882-4c57-b3fc-002c83978c54_My-IotHub-EventHubEndpoint-ConnectionString",
        "StorageConnectionStringSecretName": "user-secret_2fba1898-c574-441d-bba9-d068f765b96f_My-Storage-ConnectionString",
        "BlobContainerName": "eventhubcheckpoints"
      }
    }
    

    Properties

    Property Required Description
    EventHubConnectionStringSecretName Yes User secret ID representing the connection string of the Azure EventHub that receives routed telemetry events from the Azure IoT Hub.
    StorageConnectionStringSecretName Yes User secret ID representing the connection string of the Azure Storage account used for checkpoint storage.
    BlobContainerName Yes Name of the blob container for storing checkpoint entries.
    EventHubConsumerGroupName No Optional consumer group name to use when subscribing to the Azure Event Hub (default: $Default)

    Models

    TelemetryEvent

    {
      "id": "string",
      "telemetry": {
        "name1": 100.00,
        "name2": 200.00,
        "name3": 300.00
      },
      "utcTimeStamp": "1970-01-01T00:00:00+00:00",
      "source": "string"
    }
    
    Back to top Generated by DocFX
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023