Azure IoT Hub

A ScaleOut Azure IoT Hub connection allows digital twin model instances to communicate with data sources (such as IoT devices) managed in the Microsoft Azure IoT Hub and receive messages originated by these devices.

Concepts

Azure IoT Hub provides a powerful, highly scalable hub for mediating the exchange of messages between data sources and their corresponding digital twin instances running in ScaleOut Active Caching. You can create an Azure IoT Hub connection to connect the on-premises deployment to your existing account on Azure IoT Event Hub. Your data sources can then communicate with Azure IoT Hub, and their messages will be forwarded to real-time digital twin instances.

To properly route messages from a data source to its corresponding digital twin instance, each JSON-encoded message needs to have a property called ModuleName with the value set to the instance’s digital twin model name, which was set within the Azure application properties (not the JSON message itself); please refer to language-specific Azure documentation on setting application properties.

Note

In the context of digital twins, the ModuleName property refers to the name of the digital twin model.

The connection uses this property to identify the data source’s real-time digital twin model. (Note that the use of application properties avoids the need to deserialize the message body.) In addition, the connection uses Azure IoT Hub’s DeviceId property to identify a specific digital twin instance. This ensures that all messages from a given data source are routed to the correct instance. An example of setting ModuleName in the Azure application properties is shown in the C# example Sending a Test Message.

Azure IoT Hub allows the user to create consumer groups for exchanging messages with clients (such as the ScaleOut Digital Twin Cloud Service). In order not to interfere with other usages of your Azure IoT Event Hub, you should create a unique consumer group for the Azure IoT Hub connection.

Azure IoT Hub also allows an Event Hub to control the number of partitions (i.e., connection endpoints) so that it can maximize the message-sending throughput of its clients. Since the Azure IoT Hub connection is highly scalable by design, you should configure the Event Hub to use at least four partitions.

To create and configure an Azure IoT Hub Connection, follow the detailed instructions in the ScaleOut Active Caching Users Guide: Creating an Azure IoT Hub Connection