Retrieve an Akka actor or create it if it does not exist
Consider creating an actor that maintains as its state a map of message IDs to ActorRef
s. This "receptionist" actor would handle all requests to obtain a message processing actor. When the receptionist receives a request for an actor (the request would include the message ID), it tries to look up an associated actor in its map: if such an actor is found, it returns the ActorRef
to the sender; otherwise it creates a new processing actor, adds that actor to its map, and returns that actor reference to the sender.