I'm going to use actors for more than 5000 clients to deliver messages to them when they arrive. If a client disconnects the clients messages stored in respective Actor's mailbox.But if jvm crashes all the messages in the actor mailbox will flushed. If i use persistence actor i will store each messages of an actor in disk?? then reply to actor like mailbox on disk?
Asked
Active
Viewed 94 times
1 Answers
1
The broad approach would be to use Akka Persistence (this sounds like a reasonable fit for event sourcing) so that the state of the actor can be recovered. You would choose and set-up a persistence backend (e.g. the local leveldb one or a DB at network distance like MySQL/Postgres or Cassandra) for the events to be stored.
Note that messages in the mailbox are not persisted; only those messages which get processed by the actor can persist state changes.

Levi Ramsey
- 18,884
- 1
- 16
- 30