On Wed, Nov 2, 2016 at 1:28 PM, Harinath Mallepally <h...@harinath.in>
wrote:

> the ActorSystem.stop takes a ActorRef as input and not ActorSelection.
> Also [1] says we preferable method to communicate with Actor is through
> ActorRef and not through ActorSelection is this correct?
>

That's correct.  The key here is the standard "Identify" message, which you
send to an ActorSelection, and which returns an ActorRef if it actually
exists.

(Alternatively, you could send your own homebrew message to the Actor,
using the ActorSelection, and let it stop itself.  Remember that every
Actor has a "self" member that is its own ActorRef.)

So in *general*, you use ActorSelection to fetch an ActorRef, and then
ActorRef to actually interact with the Actor.  That isn't required, but it
tends to be easiest...

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to