Closed NielsPilgaard closed 1 year ago
You don't necessarily need to subscribe to $all, you can read, for example, the last event from $all
Ah right - Is there always at least 1 event in $all?
There should be something there as when the server starts it writes something to it. In any case, $all exists unconditionally, so even if you get an empty response (which I doubt), you understand that the call went through. You will never get Stream not found
when reading from $all for sure :)
That should work nicely then, thank you!
Is your feature request related to a problem? Please describe. I have a hard time validating that my ES connection is healthy without performing an operation that would create a stream. The only reliable method I've found is to briefly subscribe to the All stream: https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/master/src/HealthChecks.EventStore.gRPC/EventStoreHealthCheck.cs#L25
Describe the solution you'd like I would like the ability to ping EventStore through the EventStoreClient, to validate a healthy connection based on the response, or lack of response.
Describe alternatives you've considered I've considered the following:
Additional context If implemented, I plan to use the Ping functionality in the ES gRPC HealthCheck nuget: https://www.nuget.org/packages/AspNetCore.HealthChecks.EventStore.gRPC