Deepbhan on Wed, 19 Dec 2018 06:50:09
I am routing all the device twin updates from IoT Hub to Cosmos DB Via Service Bus Queues and Azure Functions
Flow : IoT Hub-->IoT Hub Message Routes-->Service Bus Queues-->Triggers Azure Function (.NET Core)-->CosmosDB
The sequence is working fine but IoT Hub is sending only Message Body to Azure Function instead of entire IoT Hub Message (which Includes System Properties, App Properties & Body)
The Body contains the below Twin Json but System Properties and Application properties of the IoT Hub Message which has the Device Id and custom properties of the device is not being sent to Azure Function.
If I just receive this Device Twin Json, I would not know which Device this twin information belong to.
Do I have to do something else ?
António Sérgio Azevedo - MSFT on Wed, 19 Dec 2018 11:55:39
Can you share the code you are using on your Azure Function to extract the message properties and body? Also why do you use Service Bus before Azure Function?
This is a good reading: How to use Azure Functions with IoT Hub message routing