question

dominikkury-6585 avatar image
0 Votes"
dominikkury-6585 asked SandervandeVelde42 answered

Multiple IOT HUB endpoints? Azure Functions and Stream Analytics

Hi, everyone,

I receive sensor data from my device via my IOT HUB in order to forward it to PowerBI via Azure Stream Analytics. At the same time, the IOT HUB triggers a function in "Azure Functions" where the data is queried accordingly and also forwarded. However, as soon as I start the function (operation in Visual Studio), the data is no longer forwarded to PowerBI via Azure Stream Analytics. Is the simultaneous forwarding of the data from the IOT HUB not possible or do I have to make additional settings?

Greetings Dominik

azure-functionsazure-iot-hubazure-stream-analytics
· 2
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.

@dominikkury-6585 To confirm , are you using same consumer group for both the endpoints? Consumer groups provide independent views into the event stream that enable apps and Azure services to independently consume data from the same Event Hub endpoint.

Also, please share more details on how exactly you are triggering function?

1 Vote 1 ·

@AshokPeddakotla-MSFT I don't use the event hub for this. The function is triggered directly via the IOT HUB, as described here:
[1]: https://docs.microsoft.com/de-de/azure/azure-functions/functions-bindings-event-iot-trigger?tabs=csharp
At the same time, I chose the IOT HUB as an input for Azure Analytics.

0 Votes 0 ·

1 Answer

SandervandeVelde42 avatar image
1 Vote"
SandervandeVelde42 answered

Double-check the consumer groups:

120131-image.png

Each target service (Azure Functions, Azure Stream Analytics, or even the IoT Explorer) should use its own consumer group. So each gets a copy of an incoming message.



image.png (158.7 KiB)
· 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.

That is exactly what I have been looking for. Working now, thank you very much!!

0 Votes 0 ·