-
Notifications
You must be signed in to change notification settings - Fork 804
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
Support more Azure EventHub client types #2258
Comments
The processor supports runtime properties as events are streamed from the service by setting EventProcessorClientOptions.TrackLastEnqueuedEventProperties. This can be read via the ReadLastEnqueuedEventProperties method on the partition context associated with the processing args or using the ReadLastEnqueuedEventProperties protected method on the class. Neither is really appropriate for a pull-based approach in an external package. One option would be to do it via callback that apps could invoke as part of their event processing. Otherwise, the recommendation would be to use the producer client as the health check sentinel. |
I'm not sure I understand the reason to allow more than one type of client to validate event hub health. Is this just to be able to reuse the underlying aspire client instance rather than have to spin up a sister client 75% of the time? |
Correct. See https://github.com/dotnet/aspire/tree/main/src/Components#health-checks. Specifically:
|
Okay. Would this issue be better placed on the Azure SDK repo? |
No. The EventHub health checks library in this repo only supports For |
This opens up a very interesting discussion about the definition of "health check" that the Azure SDK developers have not finished arguing over. 😄 |
What would you like to be added:
Today the AzureEventHubHealthCheck only supports one type of client:
EventHubProducerClient
.AspNetCore.Diagnostics.HealthChecks/src/HealthChecks.Azure.Messaging.EventHubs/AzureEventHubHealthCheck.cs
Lines 8 to 13 in 42c2c73
We should add support for the other kinds of EventHub clients:
There is another client
EventProcessorClient
, however this client doesn't have aGetXPropertiesAsync()
API that we use in the AzureEventHubHealthCheck. So it may not be possible to implement a Health Check based on that client.Why is this needed:
.NET Aspire supports registering the above 4 client types. In trying to enable health checks in .NET Aspire, only the EventHubProducerClient can be used directly. See dotnet/aspire#4139.
cc @adamsitnik @jsquire @oising
The text was updated successfully, but these errors were encountered: