Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProcessEventsAsync Handler not set #430

Open
Selekena opened this issue Oct 10, 2024 · 1 comment
Open

ProcessEventsAsync Handler not set #430

Selekena opened this issue Oct 10, 2024 · 1 comment
Assignees
Labels
bug Something isn't working P1 Priority 1

Comments

@Selekena
Copy link

We are setting up our .Net app with netherite against a storage account and eventhub. We get an exception when our app attempts to start.

System.InvalidOperationException
HResult=0x80131509
Message=Cannot begin processing without the ProcessEventAsync handler set.
Source=Azure.Messaging.EventHubs.Processor
StackTrace:
at Azure.Messaging.EventHubs.EventProcessorClient.d__73.MoveNext()
at Azure.Messaging.EventHubs.EventProcessorClient.d__54.MoveNext()
at DurableTask.Netherite.EventHubsTransport.EventHubsPartitionManager.d__16.MoveNext()
at DurableTask.Netherite.EventHubsTransport.EventHubsTransport.d__39.MoveNext()
at DurableTask.Netherite.NetheriteOrchestrationService.d__94.MoveNext()
at DurableTask.Netherite.NetheriteOrchestrationService.<>c__DisplayClass92_0`1.<g__conditionalTransition|0>d.MoveNext()
at DurableTask.Netherite.NetheriteOrchestrationService.d__91.MoveNext()
at DurableTask.Core.TaskHubWorker.d__32.MoveNext()
at Microsoft.Azure.EdgeProvisioning.Common.Workflow.Engine.WorkflowWorker.d__10.MoveNext()
at Microsoft.Azure.EdgeProvisioning.Common.Workflow.Engine.WorkflowEngine.d__5.MoveNext()
at Microsoft.Extensions.Hosting.Internal.Host.d__12.MoveNext()
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.d__4.MoveNext()
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.d__4.MoveNext()
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Microsoft.AspNetCore.Builder.WebApplication.Run(String url)
at Program.


This exception was originally thrown at this call stack:
[External Code]
Program.$(string[]) in Program.cs

We supposed (and I get this from reading the source here) that this should be handled by Netherite already. Our other apps did not need to register one. Is this a netherite issue or are not passing something into the Taskhubworker startAsync?

@sebastianburckhardt
Copy link
Member

sebastianburckhardt commented Oct 14, 2024

It looks to me like there is a line missing from the second constructor in EventProcessorHost.cs. By all appearances, a simple copy-paste mistake that got missed in the testing because all the tests use the other constructor.

I submitted a PR to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Priority 1
Projects
None yet
Development

No branches or pull requests

3 participants