Persistent subscriptions management

Hello!

Is there any example of how to use the Persistent Subscriptions Management API like List/Describe?
I see in the docs there’s a PersistentSubscriptions class referenced that should be used for management, but it does not exist in Release 5.0.8. I guess it does in newer versions?

Instead, there’s a PersistentSubscriptionsManager class which implements no interface. The constructor is publicly exposed but there’s no guide related to how you are supposed to use it. Some dependency injection helpers would’ve been nice!

Any help would be very appreciated, thanks!

Hmm, I am not aware of the API changes, I think the docs are just incorrect. But you don’t need an interface to use the instance. It is normally a singleton. The constructor parameters are self-explanatory albeit I agree we have to document it better. From what I can see, it can be used like this:

var mgr = new PersistentSubscriptionsManager(new ConsoleLogger(), new DnsEndPoint("my-es.acme.com", 2113), TimeSpan.FromSeconds(1));

You need to talk to the external HTTP port.

I added some lines to this page https://developers.eventstore.com/clients/dotnet/5.0/subscriptions/persistent-subscription-manager.html#persistent-subscriptions-monitoring

1 Like