azure-sdk-for-net
azure-sdk-for-net copied to clipboard
[QUESTION] Events not triggered when upgraded to version 5.x.x
Library name and version
Microsoft.Azure.WebJobs.Extensions.EventHubs Version 5.x.x
Query/Question
I have been updating old Nuget packages and installing new ones since many of them have been deprecated. I just switched from using Microsoft.Azure.Eventhubs (Legacy package) to Azure.Messaging.Eventhubs. However, I am using [EventhubTrigger] in a async Task Run function, the issue is when the Microsoft.Azure.WebJobs.Extensions.EventHubs package is updated to version 5 and above it seems the Trigger does not work anymore. There were no changes at all regarding the event-hub itself or the triggers.
When I run the Azure function it starts up normally and runs through the AzureFunctionConfig and when the main function of the app runs it stops at the Eventhub Triggers
[FunctionName("FUNC_NAME")]
public async Task Run(
[EventHubTrigger("EH_NAME", Connection = "EHConnectionString", ConsumerGroup = "$Default")] EventData[] events,
[EventHub("EH_NAME2", Connection = "EHConnectionString2")] IAsyncCollector<EventData> outputEvents,
[EventHub("DLQEH", Connection = "EHConnectionString2")] IAsyncCollector<EventData> dlqEvents,
ILogger log)
Any ideas what could possibly be wrong?
Environment
Target framework .NET 6 Azure Function Version V4 IDE Version Visual Studio 17.3.0 Windows 10
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Can you clarify what you mean by
when the main function of the app runs it stops at the Eventhub Triggers
Do you mean that when events are delivered to your event hub, the function does not execute?
Yes, so when an event is delivered, the eventhubTrigger does not pick up the event and therefore the rest of the code does not execute.
@limethor: Can you confirm whether or not this is the only application running for this Event Hub and Consumer Group? Is it possible that there are other applications running which use an extensions package earlier than 5.x or are using the one of the legacy Event Hubs SDK packages to read events?
It would be helpful to understand what the logs are seeing. Specifically, the following:
Event Source Name: "Azure-Messsaging-EventHubs"
- All warnings
- All errors
- Id: 6 (Event Receive Start)
- Id: 7 (Event Receive End)
- Id: 8 (Event Receive Error)
- Id: 39 (EventProcessorPartitionProcessingStartComplete)
- Id: 42 (EventProcessorPartitionProcessingStopComplete)
Hi, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!