I’d like certain actors to be globally available in my application. My specific use-case is a “status actor” that monitors the overall health of the application, who any actor should be able to report to.
I want this global actor(s) to be accessible without much code overhead - no asynchronous request-response patterns to obtain the ActorRef. Think of adding logging capabilities using a trait.
The best approach I have found so far seems to be to write an
Extension that creates the
ActorRef synchronously using
systemActorOf, and then makes this ActorRef accessible for all.
Are there any obvious caveats/problems with using
systemActorOf and/or is there a better approach?