So I have a basic setup for listening on events coming in to Event Hub, using an Event Hub Trigger function, defined as follows:
[FunctionName("myfunction")]
public async Run([EventHubTrigger(myeventhub, Connection = "EventHubConnectionAppSetting", ConsumerGroup = %myconsumergroup%)], EventData eventHubMessage, ILogger logger)
Where the values for the connection and consumergroup parameters are in my local settings.
Running my function and sending events via Postman (properly authenticated), the function is not triggered.
The only way the function is every triggered is if I remove the ConsumerGroup from the parameters, which will cause it to point to the $Default consumer group for the event hub:
[FunctionName("myfunction")]
public async Run([EventHubTrigger(myeventhub, Connection = "EventHubConnectionAppSetting"], EventData eventHubMessage, ILogger logger)
My goal is to keep my custom consumer group and have the function trigger for events coming into that consumer group.
I will mention that I'm testing this out locally, and using local storage:
AzureWebJobsStorage="UseDevelopmentStorage=true"
But obviously the event hub in question is an actual created resource on Azure, with the relevant consumer group existing under it as well.