EventStore / documentation

Next-gen documentation website
https://developers.eventstore.com/
10 stars 17 forks source link

SubscribeToStreamAsync method signature different than documentation states #545

Open jjwilliams42 opened 2 years ago

jjwilliams42 commented 2 years ago

New to ESDB. The method signature of SubscribeToStreamAsync on version 22 is different than the documentation states.

The docs says there is a "groupName" field, yet the actual method signature does not have it (in code).

I wrote it up here: https://discuss.eventstore.com/t/subscribetostreamasync-missing-groupname-argument/4316

But noticed most questions in this category on the forum go unanswered, so figured I'd post it here.

I couldn't find any other documentation to show how I might do what I need to do so I'm kind of stuck.

DOC-141

jjwilliams42 commented 2 years ago

Update:

Turns out you just left off which client needs to be instantiated in the persistent subscriptions documentation (and the needed nuget dependency).

For anyone else who pulls their hair out over this, I pulled the source code and found this:

When using gRPC with a persistent subscription - you cannot just use the EventStoreClient. My mistake was going from their gRPC "Getting Started" where they just new up an EventStoreClient to the persistent subscription docs (which doesn't instantiate anything - the examples just show method executions like client.SubscribeToStreamAsync()).

The client discussed in this code:

image

Is actually an EventStorePersistentSubscriptionsClient (maybe - can someone from the ES team confirm?), which, after more digging, is in a completely different nuget dependency: EventStore.Client.Grpc.PersistentSubscriptions (which also isn't mentioned in the documentation)

I'm pretty exhausted TBH, and I feel like an idiot for not seeing this.

Recommendation: improve package reference mentions and show which clients you are instantiating in your docs.

The smoother the onboarding the easier it is for me to make a case to my organization for ES.

jjwilliams42 commented 2 years ago

This is for the persistent subscription documentation at https://developers.eventstore.com/clients/grpc/persistent-subscriptions.html#creating-a-subscription-group

natrexjacobs commented 2 months ago

Just noting that as of today the deployed docs still don't appear to mention EventStorePersistentSubscriptionsClient anywhere.

The 'logical' places I looked first: