I use the Akka event stream in the Play application as an event bus, where I can publish events and subscribe to listeners, and I would like to know what errors should be taken into account. In particular, there are two things:
- Each listener is realized through an actor who receives published events and processes them. What if the actorβs message queue starts to get large? How can I safely implement back pressure, ensuring that every event is ultimately handled?
- Related to the previous: how can I transfer unprocessed events, so in case of failure the application can start again and process them? I know about the existence of akka-persistence, but I'm not sure that would be correct in this case: Listener actors are not restrained, they do not need to replay past events, I just want to save the unprocessed events and delete them after they are processed.
source share