We’re developing an instance messaging platform and we’re using akka-persistence-cassandra to persist our data.
One of the problems we have is huge memory consumption due to too many running actors (of course, we have set the receive timeout to stop idle actors). The main reason behind the actors being up is that due to the nature of persistence actors, every time we want to persist an event, all of the events will be replied for the actor to restore it’s state, and it will wait until reaching receive timeout to stop itself. Also, this behavior leads to too many redundant read queries on Cassandra while the only thing we need to do is to write the new event.
So, we decided to find a solution to persist events without restoring the actor’s state. Is there any solution implemented in akka-persist to solve this problem or should we implement a solution? how do you propose we solve this problem?