Subscribe for each persistenceId vs subscribe to all events

I am using Akka Persistence and Persistence Query with Eventstore. In order to built read models I need to subscribe to events for each persistenceId. It means, that I need to create:
- as many subscriptions as persistenceIds - the question is what about performance if I will have 1 milion persistenceIds?
- projection for selected events and subscribe to this stream?
- subscription for all events from system and filter it out on app level?

What will be the best approach in order to keep as best performance of Eventstore as it is possible?


Normally subscribe to all and filter will be your best option
depending on message throughput. Its "network stupid" but tends to be

Thanks for answer - so I will try to subscribe to all, it also fits very good to Akka Streams processing.



W dniu poniedziałek, 8 lutego 2016 11:24:49 UTC+1 użytkownik Greg Young napisał:

I have one more question. I have noticed that stream of all events also contains system stats events. The problem is, that this event is produced by default every 30s which is about 90k events per month. If I need to replay all domain events I need also filter out all system events which can extends the time of process.

  1. Is it possible to configure EventStore to not store system stats events in stream of all events?

  2. Maybe it is good idea to change system stats period?

Thanks for your help,


W dniu poniedziałek, 8 lutego 2016 07:42:51 UTC+1 użytkownik Maciej Ciołek napisał:

You can:

1) configure system stats at interval : --stats-period-sec=1000 (in seconds)
2) configure the stats stream to have a maxAge/maxCount and scavenge
which removes old stat events