EventStore-Client-Go icon indicating copy to clipboard operation
EventStore-Client-Go copied to clipboard

question: Persistent Subscription Docs vs. Code

Open seanppayne opened this issue 1 year ago • 6 comments

// PersistentAllSubscriptionOptions options for most of the persistent subscription requests.
type PersistentAllSubscriptionOptions struct {
	...
	// Requires the request to be performed by the leader of the cluster.
	RequiresLeader bool
}

I am just curious, why is there an option for RequiresLeader when the docs state the following:

Persistent subscriptions only run on the Leader node. This means that more pressure will be put on the Leader node, and there is no option to balance the load to a follower like with a Catch-up subscription.

Is there a use case for this option or should I default to setting it to true?

seanppayne avatar May 23 '24 08:05 seanppayne