Azure

Azure IoT Hub message enrichment simplifies downstream processing of your knowledge

We simply launched a brand new functionality that permits enriching messages which might be egressed from Azure IoT Hub to different providers. Azure IoT Hub gives an out-of-the-box functionality to robotically ship messages to totally different providers and is constructed to deal with billions of messages out of your IoT gadgets. Messages carry essential data that allow numerous workflows all through the IoT answer. Message enrichments simplifies post-processing of your knowledge and may scale back prices of calling gadget twin APIs for data. This functionality means that you can stamp data in your messages, comparable to particulars out of your gadget twin, your IoT Hub title or any static property you need to add.

Diagram of IoT Hub workflow and message routing

A message enrichment has three key components, the important thing title for the enrichment, the worth of the enrichment key, and the endpoints that the enrichment applies to. Message enrichments are added to the IoT Hub message as software properties. You possibly can add as much as 10 enrichments per IoT Hub for traditional and fundamental tier IoT Hubs and two enrichments free of charge tier IoT Hub. Enrichments may be utilized to messages going to the built-in endpoint, messages which might be routed to the built-in endpoint, or customized endpoints comparable to Azure blob storage, Occasion Hubs, Service Bus Queue, and Service Bus matter. Every enrichment can have a key that may be set as any string, and a worth that may be a path to a tool twin (e.g. $twin.tag.area), the IoT Hub sending the message (e.g. $iothubname), or any static worth (e.g. myapplicationId).

You too can use the IoT Hub Create or Replace REST API, and add enrichments as a part of the RoutingProperties. For instance:


"routing": {
             "enrichments": [
                   {
                         "key": "appId",
                         "value": "myApp",
                         "endpointNames": ["events"]
                   },
                   {
                         "key": "Iot-Hub-Identify",
                         "worth": "$iothubname",
                         "endpointNames": ["events"]
                   },
                   {
                         "key": "Gadget-Location",
                         "worth": "$twin.tags.location",
                         "endpointNames": ["events"]
                   }
             ],
             "endpoints": {
                 "serviceBusQueues": [],
                 "serviceBusTopics": [],
                 "eventHubs": [],
                 "storageContainers": []
             },
             "routes": [{
                 "name": myfirstroute",
                 "source": "DeviceMessages",
                 "condition": "true",
                 "endpointNames": [
                     "events"
                 ],
                 "isEnabled": true
             }],
             "fallbackRoute": {
                 "title": "$fallback",
                 "supply": "DeviceMessages",
                 "situation": "true",
                 "endpointNames": [
                     "events"
                 ],
                 "isEnabled": true
             }
         }

This function is usually out there in all areas IoT Hub is out there in. We’re excited so that you can do this functionality and construct extra streamlined IoT options for your enterprise. Do this tutorial to get began.

We might love to listen to extra about your experiences with the preview and get your suggestions! Are there different capabilities in IoT Hub that you simply wish to see? Please proceed to submit your options via the Azure IoT Consumer Voice discussion board.

Tags
Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Close