How to read all events


is it possible to read all events?

– Ivo

There is a special stream being added in dev now called $all it’s highly optimized. You can do it yourself as well using an index projection (there is a thread in the history on here that explains, on iPad so getting link is a bit tough)

Is this the correct way to use it?

var slice = EventStore.ClientAPI.EventStore.ReadEventStream("$all", 0, int.MaxValue);

I’m not sure it’s pushed it’s definitely only in dev. You probably don’t want to read that way anyways. More like 50 at a time in a loop.

Did you add the projection I pointed to?

all_stream is a branch and is not in dev :slight_smile:

Then it’s not merged back yet may or may not be in working order :slight_smile: I know it was being actively worked on this morning :slight_smile:

See the other thread for the projection that can create an all stream for you then just replace when it’s merged back in.

Off top of my head

Fromall().whenany(function(s,e) { linkto(‘all’, e)})