I am facing an error at Azure function level. The data is received at IoT Hub as I can see my device but the function errors out
Q&A currently supports the products listed in right-hand pane (more to be added later on)
You can reach the experts in the dedicated Azure Migrate forum over here:
(please don't forget to mark helpful replies as answer)
It's not clear what exception @LukeVupputuri-5950 is referring to.
I invested the possible errors mentioned above by just recreating the most optimal path:
I created an Azure Function and an IoT Hub.
I gave the IoT Hub an extra consumer group named AF.
I created a single IoT device and used the https://azure-samples.github.io/raspberry-pi-web-simulator/ to create some JSON messages. Messages are arriving at my IoT Hub.
I created an Azure function application (based on .Net Core)
I created an IoTHub (event hub) function with just the IoT Hub connected together with the consumer group.
No messages arrived at my function.
In the logging of the function monitor log (live metrics), this exception was shown:
The listener for function 'Functions.IoTHub_EventHub1' was unable to start. <--- Encountered error while fetching the list of EventHub PartitionIds <--- InvalidSignature: The token has an invalid signature.
I tried some other trigger settings (eg. changing the consumer group to $default, setting the function trigger event hub name to the iot hub eventhub name) but the same exception kept showing.
I then routed the same messages to a regular eventhub. A new function with an eventhub trigger was working right away.
So, the IoT hub function does not seem to be working. No idea why.
Personally, I recommend using the IoT hub routing together with the extra eventhub. For a little bit more money, a much more flexible architecture is introduced.
16 people are following this question.