Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1367

Spawn Global Actors Synchronously

$
0
0

Hi,

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?

Cheers

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1367

Trending Articles