Is it possible to somehow connect Azure Function to Iot Hub cloud to device feedback endpoint? It looks like this endpoint isn't compatible with Azure Event Hubs.
Write custom event trigger?
I use C# Azure Function.
Is it possible to somehow connect Azure Function to Iot Hub cloud to device feedback endpoint? It looks like this endpoint isn't compatible with Azure Event Hubs.
Write custom event trigger?
I use C# Azure Function.
Currently the Cloud to device feedback endpoint doesn't support subscribed for the Azure function directly.
A normal scenario is that we should handle the feedback after sending the C2D messages immediately. That is implement by the IoT Hub Service SDK via ServiceClient.GetFeedbackReceiver(). More detail about handling feedback of C2D messages you can refer Receive delivery feedback.
And if you also want to handle these feedback from Azure function, you can forward it from your ServiceClient using the HTTP Request where you send the C2D messages. Then you can create a Azure function with the Http trigger to receive it.
And if you have any idea and feedback about Azure IoT Hub you can submit it from here.
Yes, you can create a custom function for IoT Hub. This function will be run whenever an IoT Hub delivers a new message for Event Hub compatible endpoints. You can follow below steps:
Create a json file named project.json with the content like:
Upload the project.json file, it is used to reference the assembly of Microsoft.Azure.Devices.You can see this document to get more information.
Add the IoT Hub connection string to the function application Settings.
Modified the run.csx as these code:
After that save and run the function, if IoT Hub delivers a new message, the function will be triggered, and in the function it will send a cloud-to-device message.