Recently I've created an Azure IoT Hub and try to send telemetry message from hardware sensor to IoT Hub then to 1 function app to do post-data processing then to storage. It is a simple flow, however, in order to proceed post-data processing, I always have to connect to another API to gather information from that API, mapped the data with the telemetry message in the function app, then only proceed to storage.
Is there any other way to reduce the dependencies or reduce the calls to the API in this case? The hardware does not know anything other than sending the measurements. When it goes through IoT Hub, it will send to a Service Bus, then SB will trigger a Function App who responsible to call the API and do post-data processing including ID mapping then only store into DB.
I found out Azure IoT Hub has a feature called Message Enrichment that allows me to add the info into Device Twin and stamped to the telemetry message. However, Device Twin have a size limitation of 8Kb on the 'tags' field. The info I want to stamp might be larger than that.
Is there any other better way than this? Thank you if anyone knows for a better solution or how's this being handled in a common situation.