Closed shaan1337 closed 5 months ago
Why is it necessary to have a checkpoint interval multiplier? if MaxSearchWindow=32
and CheckPointIntervalMultiplier=6
, then why not just MaxSearchWindow=192
- Am I missing something obvious?
Hi @ahjohannessen The main reason for having the interval and the window separate is so that the number of events being read at a time on the server can be better controlled. By default, the CheckpointInterval
is set to 1, so your subscription will checkpoint every time it has considered MaxSearchWindow
count of events.
However, you may want to checkpoint much further apart, say every 1000 events, but would rather keep the read batches small to lower load on the system. In that case, you could set the MaxSearchWindow
to 50 and the CheckpointInterval
to 20.
@hayley-jean All good. Just thought it is convoluted from a client lib perspective, but I get your point 👍
This is a breaking change and needs to be done in the next major version:
https://github.com/EventStore/EventStore-Client-Dotnet/blob/master/src/EventStore.Client.Streams/SubscriptionFilterOptions.cs#L19
https://github.com/EventStore/EventStore-Client-Dotnet/blob/master/src/EventStore.Client.Streams/SubscriptionFilterOptions.cs#L37
The checkpoint interval is actually multiplied by the max search window to determine the number of events after which to checkpoint.