question

BryanDesrosiers-6485 avatar image
0 Votes"
BryanDesrosiers-6485 asked BryanDesrosiers-6485 commented

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

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-functionsazure-iot-hubazure-event-hubs
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SandervandeVelde42 avatar image
1 Vote"
SandervandeVelde42 answered BryanDesrosiers-6485 commented

Hello @BryanDesrosiers-6485,

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the help, this seems to have been my issue!

0 Votes 0 ·