SubscribeToStreamAsync missing groupName argument?

New user to EventStore DB. I understand the basics I believe.

I’ve been working on porting an old TCP/HTTP based framework to the newer GRPC services and ran into a documentation inconsistency as I work to change all IEventStoreConnection refs to EventStoreClient.

In the IL breakdown / method signature of version 22 of EventStore.Client.Streams.EventStoreClient.SubscribeToStreamAsync I see:

    public Task<StreamSubscription> SubscribeToStreamAsync(
      string streamName, 
      FromStream start, // Notice there is no Subscription Group
      Func<StreamSubscription, ResolvedEvent, CancellationToken, Task> eventAppeared,
      bool resolveLinkTos = false,
      Action<StreamSubscription, SubscriptionDroppedReason, Exception?>? subscriptionDropped = null,
      UserCredentials? userCredentials = null,
      CancellationToken cancellationToken = default (CancellationToken))
      return StreamSubscription.Confirm(this.ReadInternal(new ReadReq()
        Options = new ReadReq.Types.Options()
          ReadDirection = ReadReq.Types.Options.Types.ReadDirection.Forwards,
          ResolveLinks = resolveLinkTos,
          Stream = ReadReq.Types.Options.Types.StreamOptions.FromSubscriptionPosition(streamName, start),
          Subscription = new ReadReq.Types.Options.Types.SubscriptionOptions()
      }, userCredentials, cancellationToken), eventAppeared, subscriptionDropped, (ILogger) this._log, cancellationToken: cancellationToken);

Notice there is no groupName string parameter as the documentation states on this page:

Am I missing something?

The method you are referring to is for the catch-up subscription. When using persistent subscriptions, you’ll need the EventStore.Client.Grpc.PersistentSubscriptions package and you can find the method mentioned in the docs.

@alexey.zimarev that’s the problem I believe, your documentation left out the class name of the client (its different than EventStoreClient) and the package you have to reference.

I opened an issue here:

Yes, you’re right. The class name is EventStorePersistentSubscriptionsClient.