Hi,

You can send an akka.actor.Identify("hello") and the actor will reply with
akka.actor.ActorIdentity("hello", Some(actorRef)) message, if it exists.
If it doesn't exist the reply will be akka.actor.ActorIdentity("hello",
None), but this message (as all messages) can be lost and then you will not
receive any reply, and then you can retry it.

You need an actor to handle the reply, which you might not have in your
Play application. Then you can use ask instead, and act on the
Future[ActorIdentity].

Cheers,
Patrik


On Sun, Feb 16, 2014 at 4:01 PM, Ömer Faruk Gül <[email protected]>wrote:

> Hi,
>
> First of all I'm using akka 2.2 with play 2.2.1. So I don't have access to
> method resolveOn.
>
> What's the proper way of checking if actor exists and create it if doesn't
> exists?
>
> So I want to check if the following actorselection exists, what can I do?
>
> Akka.system().actorSelection("room-"+room.id)
>
> Thanks.
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: http://akka.io/faq/
> >>>>>>>>>> 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/groups/opt_out.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      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/groups/opt_out.

Reply via email to