akka-persistence-cassandra
akka-persistence-cassandra copied to clipboard
DistributedPubSub for eventsByPersistenceId
Short description
Right now I use a really short refresh-interval to simulate near realtime updates to a persistence Id. I notice this is pretty taxing on Cassandra. I have it set to 50ms
Details
It would be nice if the mechanism for making eventsByTag updates faster (distributed pub sub) could also be applied to eventByPersistenceId. If it could be faster I could push the refresh-interval to a more reasonable number, (1s or 500ms) which would ease the load on cassandra.
I think this can be a nice improvement. It should then be aligned with the new "allEvents query" without tags, if we decide to go forward with that. https://github.com/akka/akka-persistence-cassandra/pull/836
It should:
- hash the pubsub topics and filter on receiver side, because it can't create one topic per persistenceId
- pubsub of full events means that queries are not needed in happy case, simple to track expected seqNr