Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EventStore Persistent Subscription Event Data

Tags:

eventstoredb

I am successfully connecting to an EventStore persistent subscription and using the EventStore ClientAPI in C#, I receive events. Everything is good except rather than receive the original event data in my ResolvedEvent I receive a reference to the event in the form <event_number>@<stream_Id>.

This is OK but to retrieve the event and process it requires me to do another trip to the EventStore and request the event using

ReadEventAsync(string stream, long eventNumber, bool resolveLinkTos);

Is there a way to receive the actual event data from the persistent subscription?

like image 446
robs Avatar asked Aug 10 '26 15:08

robs


1 Answers

You need to add ResolveLinkTos() when creating a persistent subscription. This code works:

var subscriptionSettings = PersistentSubscriptionSettings.Create()
    .StartFromBeginning()
    .ResolveLinkTos()
    .WithMaxRetriesOf(_retryCount);
like image 149
Alexey Zimarev Avatar answered Aug 17 '26 03:08

Alexey Zimarev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!