Alternative to $all that doesn't show all the system events?

Is there another stream that can show me all the events, but exclude the system events?

Thanks,

Josh

Not that I’m aware of. However, you could try with a projection; maybe something similar to:

fromStream(’$all’)

.when({ $any: function(s,e) {

if (e.Type.substring(0,1) != “$”)

linkTo(“all”, e);

}})

To improve the projection above
fromAll()

.when({
$any: function(s,e) {
linkTo(“all”, e);

   }

})

``

When using fromAll, the events flow through a filter that should filter out all system streams for you so you don’t need to recode that logic into a projection that uses fromAll

That’s great info (would love to find that documented somewhere). However, I’ve just tried it and the last events in the stream seem to be ACL events: type $metadata having names such as 0@$$2016-01-26 and data:

{
  "$acl": {}
}

fromAll will filter out system streams, but still includes the metadata of any non-system streams.

you can use this to get rid of more system messages…

        if (arg2.OriginalStreamId.Contains("$")) return;

private void HandleEvent(EventStoreCatchUpSubscription arg1, ResolvedEvent arg2)

{

if (arg2.OriginalStreamId.Contains("$")) return;

var @event = arg2.DeserializeEvent();

if (@event != null)

_bus.Publish(@event);

_checkpointerCounter.Set(arg2.OriginalEventNumber);

}