Azure Iot Event Hub Transmit

An azure event hub transmit (connects to an Azure EventHub instance).

Example:

If we want to upload our records from the bathhouse:water stream to our Azure EventHub, the config will look like this:

{
    "data_transmit": [
        {
            "transmit_name": "iot_eventhub_transmit",
            "transmit_type" : "eventhub",
            "filter_stream": [
                "bathhouse:water"
            ],
            "connection_string": "HostName=...;SharedAccessKeyName=...;SharedAccessKey=..."
        }
    ]
}

Configuration:

Required and optional properties that can be configured for the EventHub transmit.

  • connection_string: A string that provides all the connection info. (Can be found in the relevant IoT EventHub Namespace -> EventHub Instance -> Shared Access Policies page)

  • event_hub_name: Name of the event hub to send data to.

  • additional_fields: additional field to add in the message payload for e.g. { “processingPath”: “SM”}

  • transmit_name: ID for the transmit. It must be unique.

  • transmit_type: Method to use in transmitting records.

  • filter_stream: A list of streams that will use the transmit. Each stream can either be * (all) or asset:stream.

  • timeout: Number of seconds to wait until timing out.

  • poll_interval: Maximum number of seconds to wait between requests

  • max_request_records: Maximum number of records to send in a single request.

  • max_request_size_bytes: Maximum number of bytes allowed in a single request. Size is capped at 4 MB.

  • opc_payload_metadata: Additional fields to add in the OPC-formatted payload. E.g. { “TiqTwin”: { “NodeId”: “a2ec725a-78e2-431b-a124-ce20b8e3e4c6” }} Ignored if use_opc_publisher_format is False.

  • opc_message_metadata: Per-message metadata fields to add in the OPC-formatted payload.

  • use_opc_publisher_format: If True, the message payload will be formatted to mimic OPC Publisher. https://github.com/Azure/Industrial-IoT/tree/main/docs/opc-publisher#opc-publisher-telemetry-formats