Azure / Azure/Azure-Functions

Event Hub Trigger does not receive events after second login after restarting a function

Open
#2,284 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

Hello,
to detect new files on an Azure FileShare, we send events to Event Hubs using Azure Monitor and process them using Azure Functions.

So:
Az Monitor -> Azure Event Hub -> Azure Functions.

To execute the Azure Function, an EventHub trigger is used. In the function.json, a Consumer Group is specified to be used by the Azure Function. So $Default is not used. When the Function is started, then the events from the Event Hub are consumed. This works fine, so the configurations between Event Hub and Azure Function fit so far.

If the Azure Function is terminated and restarted, it will no longer receive new events. A new consumer group can be created and adjusted in the function.json. After that, of course, all events in the hub are processed again, but at least it runs fine again. No erroneous log entries are written (Azure Monitor Event Hubs) or issued in the log when running locally.

This behavior affects a locally running Function and also one that is deployed.
Functions deployed in the cloud also stop receiving messages after the Azure Function App is restarted. So exactly the same behavior. After a consumer logs into the configured Even Hub for the second time, it no longer receives any data.

There are no other consumers of the Hub, only this one Azure Function.

Do you have any idea what this is caused by?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.