Hi,
This worked, sort of. It compiles but I'm getting that the actor isn't
found. So my guess is that I need to use another method other than
resolveOne?
Is there a way to list all existing actors within an actorsystem, from an
actors context?
Here's my code
val actorRef =
Await.result(context.actorSelection("user/websocket-worker").resolveOne(),
timeout.duration)
[ERROR] [06/22/2014 01:45:56.036] [c0smo-akka.actor.default-dispatcher-5]
[akka://c0smo/user/router] Actor not found for:
ActorSelection[Anchor(akka://c0smo/user/router#-1336484262),
Path(/user/user-service)]
On Sat, Jun 21, 2014 at 12:44 PM, Владимир Морозов <[email protected]>
wrote:
> Hi,
>
> you can try this code:
> val actorRef =
> Await.result(system.actorSelection(actorName).resolveOne()(resolveTimeout),
> awaitTimeout)
>
> best regards, Vladimir
>
> суббота, 21 июня 2014 г., 18:50:07 UTC+4 пользователь Troy Payne написал:
>
>> Hello,
>>
>> I'm trying to get an ActorRef from an ActorSelection and my knowledge of
>> Futures is a bit limited.
>>
>> This is my embarrassing attempt:
>>
>> val webSocketWorker = context.actorSelection("user/
>> websocket-worker")
>> webSocketWorker.resolveOne {
>> actorRef: ActorRef =>
>> sender ! Http.Register(actorRef)
>> }
>>
>> Thanks in advance
>>
> --
> >>>>>>>>>> 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 a topic in the
> Google Groups "Akka User List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/akka-user/Mx8wnvu7cL4/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>
--
>>>>>>>>>> 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.