Hi,
I would like to better understand how a Receptionist actor is going to work.

        val receptionist: ActorRef[Command] = ctx.spawn(Props(Receptionist.
behavior), "receptionist")

        receptionist ! Register(MySystem, someActor)([1])
        receptionist ! Find(MySystem)([2])


[1] why it is expected to pass to “replyTo” argument already registered 
(ActorRef[Registered[MyCommand]])?

[2 ]If I want to find an actor I would like to have ask pattern like
val actor = receptionist ? Find(MySystem)(“some unique name”)

but now I am expected to pass type ActorRef[Listing[MyCommand]] which looks 
like a *reply* from a Find command.
What I get now is a list of actors of given type. Does it mean, that if I 
want to look for one specific actor I have to define multiple ServiceKey 
objects?

How to obtain an Actor to work with during message processing? Can it be 
passed only directly to behavior or through the message?
I can define behavior of type ActorRef[Registered[MyCommand]] but it cannot 
be at the same type ActorRef[Listing[MyCommand]],
so one actor cannot register and find actors.

Thank you,
Leszek

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to