Define Message Routing for Temperature Exceptions in Industrial IoT Solution | AZ-220 Exam

Compose Routing Query for Temperature Exceptions

Question

You are building an industrial IoT solution where you collect telemetry data from a number of temperature sensors installed on high-performance pumps.

Based on the telemetry data sent, the messages must be forwarded to a storage container, but in the cases where the temperature values coming from building 51 (which is a priority site) exceed 60 degrees must be published to a Service Bus topic which is monitored by the operations and maintenance personnel.

You need to define message routing.

How should you compose the routing query for the temperature exceptions?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: C.

Option A is incorrect because device-to-cloud messages have to comply with the common format of system properties, application properties and a message body.

Properties starting with “$” are taken as system properties.

The property names in this option are invalid.

Option B is incorrect because system properties in D2C messages have a fixed set of properties which cannot be extended or altered.

Application properties are user-defined strings but they are not intended to be used for storing telemetry data.

In addition, the format of the parameters is wrong.

Option C is CORRECT because the telemetry data are coming in the body section of the device-to-cloud messages, while static deployment locations of the devices is typically defined as a device twin tag.

Option D is incorrect because the physical location of the devices is typically defined as device twin tag.

Properties.reported are used by devices to report actual values against desired properties.

References:

To route the messages based on the telemetry data sent by the temperature sensors, we need to define a query for message routing. In this scenario, we want to forward the messages to a storage container in general, but in the cases where the temperature values from building 51 exceed 60 degrees, we want to publish them to a Service Bus topic monitored by the operations and maintenance personnel.

Option A: $Coolant.Temperature > 60 AND $deploymentLocation.building = "51" This query is incorrect because it references a property called $deploymentLocation that has not been defined in the scenario. Also, the comparison operator ">" should be replaced with ">" in the query.

Option B: Application.properties.Coolant.Temperature > 60 AND $System.properties.deploymentLocation.building = "51" This query is incorrect because it references the Application and System properties, which are not relevant to this scenario.

Option C: $body.Coolant.Temperature > 60 AND $twin.tags.deploymentLocation.building = "51" This query is correct. It references the $body property, which contains the telemetry data sent by the temperature sensors. It also references the $twin.tags.deploymentLocation.building property, which is a tag assigned to the device's digital twin. In this scenario, we assume that the temperature sensors are IoT devices with digital twins created in Azure IoT Hub. The tag assigned to the digital twin specifies the building location of the device. Therefore, this query checks whether the temperature value is greater than 60 and whether the device is located in building 51. If both conditions are true, the message is forwarded to the Service Bus topic.

Option D: $body.Coolant.Temperature > 60 AND $twin.properties.reported.deploymentLocation.building = "51" This query is also correct. It references the $body property and the $twin.properties.reported.deploymentLocation.building property, which is a reported property of the device's digital twin. Similar to the previous query, it checks whether the temperature value is greater than 60 and whether the device is located in building 51. If both conditions are true, the message is forwarded to the Service Bus topic.

Therefore, the correct answer to the question is either Option C or Option D.