2 Functions with the same IoT hub input cause the functions to not always fire on an Iot hub event.

Bryan Desrosiers 21 Reputation points
2021-10-22T19:25:01.367+00:00

I have 2 azure functions which both are triggered by the same Iot Event Hub. When I only have one function enabled, everything works as expected and the function app triggers on every event hub message as expected. However, when I enable both of the function apps, the messages are not being routed to both functions, causing issues with our system as we need both functions to trigger on each event hub event.

This has me confused, as in the documentation I don't see anything that says you cannot have 2 functions using the same input but nevertheless both functions will only trigger properly if they are the only function enabled.

Please let me know if there is something that I missed in the documentation or if you have any ideas on how to fix this issue

Thanks
-Bryan

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,235 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,115 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
555 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde 28,236 Reputation points MVP
    2021-10-23T21:33:14.363+00:00

    Hello @Bryan Desrosiers ,

    could you check if you are reusing the same IoT Hub consumer group?

    Each consumer (eg. Azure Stream Analytics, Azure Functions, Time Series Insights) of the IoT Hub event stream should have it's own unique consumer group.

    Please do not reuse $default for actual consumers. Tooling like the IoT Explorer promote this default consumer group, potentially picking away messages....

    There is a maximum of 20 consumer groups per IoT Hub.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful