0

I am testing event sourcing (akka-persistence) and wrote my own Journal plugin. But when running performance tests, I quickly noticed that not all CPU resources are used. The class which writes messages to the journal is an actor (e.g. is executes all write operations in serial).

Is it possible to use multiple instances of this journal actor to increase the write performance to the journal backend? If yes, how?

Thanks

sebdehne
  • 332
  • 3
  • 7

1 Answers1

0

As I hinted at on the akka-user mailing list, there is no way right now to have multiple Journal actors. What you can do though is to implement the AsyncWritePlugin API that will allow the actor to do the writes in a non blocking fashion, and then you can scale out the writes in your plugin.

Björn Antonsson
  • 1,019
  • 6
  • 9
  • I know this is old, but designs like this are not reliable!!! For any reason second, or N-th, journal could be unavailable so you can end up with un consistent state. Even if you don't care about consistency, why you need something to blow your business transaction if it could be persistent in first journal. My proposal would be to create another actor that will subscribe to fist journal (what ever you need, events or snapshot), then store them in it's own journal. On crash it would read last processed sequenceNo and continue from that point. – Milan Jaric Aug 18 '18 at 20:00