We are trying to deploy an Azure Function in an App service Environment in an Isolated App Service Plan. This Azure Function should be triggered each time we receive a message in an event hub. Unfortunately it doesn't seem to work even though we've tried different network configurations :
- Authorised ASE subnet in the networking section in Event Hubs Namespace
- White listed both subnet IP ranges and ASE Outbound IP Addresses.
- And Allowed trusted Microsoft services.
Could you please help us debug this situation in order to understand why our Azure Function is not triggered.
Here are the steps to create function app that triggers when there is an event generated in EventHub try to check these steps and make required changes in your code to execute your requirement.
Add the below code in your
local.settings.json
file zBelow is the code that will bind azure function with EventHub so that it will result in triggering message automatically when there is any event generated in EventHub.
For Complete information check Azure Functions and EventHub.
Also, Check these SO threads for related information. SO1, SO2 and these Microsoft Q&A