microsoft / durabletask-netherite

A new engine for Durable Functions. https://microsoft.github.io/durabletask-netherite
Other
221 stars 24 forks source link

Unsupported Connection String Parameter for Event Hubs Emulator #417

Open FarhadJabiyev opened 3 weeks ago

FarhadJabiyev commented 3 weeks ago

Description I am encountering an issue when using the new Azure Event Hubs Emulator with Netherite. The emulator connection string includes an additional parameter: UseDevelopmentEmulator=true. However, due to outdated Event Hubs packages in Netherite (some of which are now deprecated), this parameter causes the following exception:

Message: 'Illegal connection string parameter name 'UseDevelopmentEmulator' (Parameter 'connectionString')'
Source: Microsoft.Azure.EventHubs
StackTrace:   
   at Microsoft.Azure.EventHubs.EventHubsConnectionStringBuilder.ParseConnectionString(String connectionString)
   at Microsoft.Azure.EventHubs.EventHubsConnectionStringBuilder..ctor(String connectionString)
   at DurableTask.Netherite.ConnectionInfoExtensions.CreateEventHubClient(ConnectionInfo connectionInfo, String eventHub)
   at DurableTask.Netherite.EventHubsTransport.EventHubsConnections.<EnsurePartitionsAsync>d__38.MoveNext()
   at DurableTask.Netherite.EventHubsTransport.EventHubsConnections.<StartAsync>d__30.MoveNext()
   at DurableTask.Netherite.EventHubsTransport.EventHubsTransport.<DurableTask-Netherite-ITransportLayer-StartAsync>d__37.MoveNext()
   at DurableTask.Netherite.NetheriteOrchestrationService.<StartClientAsync>d__93.MoveNext()
   at DurableTask.Netherite.NetheriteOrchestrationService.<>c__DisplayClass92_0`1.<<TryTransition>g__conditionalTransition|0>d.MoveNext()
   at DurableTask.Netherite.NetheriteOrchestrationService.<TryStartAsync>d__91.MoveNext()
   at DurableTask.Netherite.NetheriteOrchestrationService.<GetClientAsync>d__22.MoveNext()
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at DurableTask.Netherite.NetheriteOrchestrationService.<DurableTask-Core-IOrchestrationServiceClient-CreateTaskOrchestrationAsync>d__108.MoveNext()
   at DurableTask.Core.TaskHubClient.<InternalCreateOrchestrationInstanceWithRaisedEventAsync>d__32.MoveNext()
   at Program.<<Main>$>d__0.MoveNext() in C:\sms_playground\Netherite\NetheriteDtfProducer\Program.cs:line 11

Background The UseDevelopmentEmulator parameter is used to specify that the Event Hubs connection is targeting the development emulator rather than a live service. However, since Netherite relies on outdated versions of the Event Hubs SDK, it does not recognize this parameter, resulting in the exception described above.

Impact Currently, the only workaround is to set up a real Event Hub service for development purposes, which is not ideal. This is because:

Request Could you please update Netherite to support the latest Event Hubs SDK or provide a workaround for handling the UseDevelopmentEmulator parameter in connection strings? This would help streamline our development process and reduce the need for a full Event Hub service in development.

anttix commented 2 weeks ago

Likely caused by #310

FarhadJabiyev commented 2 weeks ago

Likely caused by #310

Hey, great finding and thanks for bringing those two issues together. I actually tried updating to the latest Event Hubs SDK locally, but I encountered more changes than I anticipated. The Event Hubs team has split some class definitions into multiple ones for better separation of concerns (SoC), which made the process more complex than expected. That's when I decided to give up and created the issue. :) Seems the issue #310 has even PR.

davidmrdavid commented 5 days ago

Thanks all - yes I think this is probably caused by not using the latest EH SDK. There's an active effort to do that (https://github.com/microsoft/durabletask-netherite/pull/385) but it's lagging behind due to other urgent work we're tackling for reliability, though having the latest EH SDK would also help in general.

davidmrdavid commented 5 days ago

@FarhadJabiyev - since this likely caused by the old EH SDK, do you mind if we close this in favor of centralizing the discussion here: https://github.com/microsoft/durabletask-netherite/issues/310?

FarhadJabiyev commented 4 days ago

@davidmrdavid Yes, totally.