azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[QUESTION] Events not triggered when upgraded to version 5.x.x

Open limethor opened this issue 2 years ago • 4 comments

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

limethor avatar Jan 06 '23 14:01 limethor

Thank you for your feedback. Tagging and routing to the team member best able to assist.

jsquire avatar Jan 06 '23 14:01 jsquire

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?

JoshLove-msft avatar Jan 09 '23 01:01 JoshLove-msft

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 avatar Jan 09 '23 08:01 limethor

@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)

jsquire avatar Jan 09 '23 14:01 jsquire

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!

ghost avatar Jan 17 '23 02:01 ghost