SubscribeToStreamAsync and unsubscribing

Hi

The client api exposes the method SubscribeToStreamAsync. How do I/should I unsubscribe to such a stream explicitly?

Thank you.

when you subscribe it returns you a subscription object
https://github.com/EventStore/EventStore/blob/dev/src/EventStore.ClientAPI/IEventStoreConnection.cs#L219

You then call unsubscribe (or dispose the subscription object)
https://github.com/EventStore/EventStore/blob/dev/src/EventStore.ClientAPI/EventStoreSubscription.cs#L64

Oh, it returns a subscription object… I didn’t notice that, too many hours in front of the pc… Sorry :slight_smile:

:smiley: