Hello Community!
Connection to Persistent Subscription is a bit too delicate. For example, when I update subscription parameters via standard EventStore Web Portal, connections count becomes 0 and EventAppeared handler in my program is not invoked any more.
I use GRPC packages:
var subscriptionsClient = new EventStorePersistentSubscriptionsClient(settings);
var persistentSubscription = subscriptionsClient.SubscribeAsync("test-stream", "test-group", EventAppeared, bufferSize: 1, autoAck: false).Result;
private Task EventAppeared(PersistentSubscription persistentSubscription, ResolvedEvent resolvedEvent, int? retryCount, CancellationToken cancellationToken) {
//code for handling an event
}
How can I check in the code that the connection is still OK (and reconnect if it’s not)?
Thank you for help.