I just upgraded to the latest binaries from the site and $maxCount doesn’t seem to be working as it used to.
If I set $maxCount = 1, the event store used to only keep the the latest event in the stream.
With the latest bits, it seems all the events are still present.
And also, do I need to set $maxAge on the createStream operation or is it cool to just set it on append?
So it seems that the only way to get $maxCount to work is to explicitly create a stream with $maxCount.
Funny thing that I noticed is that isJson MUST be true when creating the stream. But events can be appended with isJson = false. (I use protobuf for snapshots).
https://gist.github.com/trbngr/5156331
If I set $maxCount = 1, the event store used to only keep the the latest event in the stream.
So it seems that the only way to get $maxCount to work is to explicitly create a stream with $maxCount.
How did you manage to set $maxCount without explicitly creating stream previously? $maxCount and $maxAge functionality wasn’t changed for quite some time now.
P.S. So it seems you were setting $maxCount on event, not on stream. That way it never worked, actually. Probably docs doesn’t state clear enough that $maxCount/$maxAge is set on stream creation metadata.
There are some changes coming on stream metadata that will solve much of this