You are building an industrial IoT solution where using several IoT hubs, you collect telemetry data from several field sensors.
The ingested data must be distributed through a Service Bus, so you need to establish a route to forward messages from your IoT hubs to a Service Bus topic.
Besides, each message needs to be stamped with the name of the IoT hub ($iothubname) which it originates from, in order to enable further classification.
You decide to use IoT hub's message routing with enrichment options.
Does it help you to achieve your goal?
Click on the arrows to vote for the correct answer
A. B.Correct Answer: A.
Option A is CORRECT because, with IoT hub's routing capability, you can forward incoming messages to other Azure services as custom endpoints, like Blob Storage or Service Bus.
Enrichment of message also can be applied as part of the routing.
Option B is incorrect Azure Service Bus (both topics and queues) are possible custom endpoints for IoT Hub, hence they are valid targets in message routing.
References:
Yes, using IoT hub's message routing with enrichment options can help achieve the goal of distributing telemetry data from multiple IoT hubs to a Service Bus topic while adding additional information to each message, such as the name of the IoT hub where the message originated from.
IoT Hub's message routing allows messages that are ingested by the IoT Hub to be forwarded to other endpoints such as Service Bus topics or Event Hubs based on a set of predefined conditions. One of the conditions that can be used is based on message enrichment. Message enrichment allows you to add additional metadata or properties to a message that can be used to route or process the message further.
In this scenario, you can configure IoT Hub message routing to route all incoming messages to a Service Bus topic. You can then use the message enrichment feature to add the IoT hub name to each message by using the $iothubname
system property. This will add the name of the IoT hub where the message originated from as a property of the message, which can be used by downstream systems to classify or filter messages based on their origin.
In summary, IoT hub's message routing with enrichment options can help achieve the goal of distributing telemetry data from multiple IoT hubs to a Service Bus topic while adding additional information to each message, such as the name of the IoT hub where the message originated from.