@krasserm it turns out I need to use a transient graph database for my write model having a subset of data of my query graph database. I can't make it out of case classes. Is it okay from your perspective? Of course, I will need to maintain in-memory state when updating view db.
@Tvaroh not sure I fully understand your question but, yes, writers can be stateful and you can use whatever data structure you like to maintain internal writer state, as long as you only modify it within the event handler. When the writer is (re)started, use the read and readSuccess methods to initialize/recover internal state. Does that help?