On Wed, Mar 19, 2014 at 7:37 AM, Anatoliy Kaverin <[email protected]>wrote:

> I see,
> but why ForwardingActor is not matched?
>

What do you mean?
You will get 2 ActorIdentity replies, one matching and one not matching.
If you are thinking about the deadletter String I guess it is similar if
you send the String to a wildcard. LookingActor is matching the wildcard,
but it doesn't have a child named ForwardingActor.


>
> Another question -> imagine that I have some different paths and I only
> care about finding a leaf, like this:
> /user/someActor/someotheActor/*someImportantActor*
>
> I have *someImportantActor* known and don't care about it's parents -> is
> it possible to lookup and skip parent levels?
>

no


> Or wildcard only used for partial search in names?
>

yes, you must know the levels
/user/*/*/someImportantActor

/Patrik


>
>
> On Tuesday, March 18, 2014 4:48:24 PM UTC+2, Patrik Nordwall wrote:
>
>> The wildcard in "/user/*/ChildActor" will match 2 actors,
>> both ChildCreationActor and LookingActor. The second path will not match
>> and you get ActorIdentity with ref null. The first path will match your
>> expected ChildActor. You will receive two ActorIdentity but you happen to
>> use only the first. The order of these messages are undefined.
>>
>> Regards,
>> Patrik
>>
>>
>> On Tue, Mar 18, 2014 at 2:18 PM, Anatoliy Kaverin <[email protected]>wrote:
>>
>>> Greetings,
>>> I've been using Akka in my Java based backend and faced some issue
>>> related to ActorSelection API if it is used from ActorContext (from inside
>>> Actor).
>>> For some reason I cannot find existing Actors via Identify message for
>>> specific paths.
>>>
>>> Imagine, that I have such Actor hierarchy:
>>> USER -> Parent Actor -> Child Actor
>>> USER -> WorkerActor
>>>
>>> And let's assume that I would like to locate Child Actor via actor
>>> selection and use wildcard for the purpose.
>>> So, I'm building such path:
>>> /user/*/ChildActor
>>>
>>> For some reason -> if this path is used for lookup via global Akka
>>> system context -> ActorIdentity provides me ActorRef
>>> But, if I will perform the same lookup but from inside WorkerActor via
>>> ActorContext -> Identify ActorRef is null.
>>>
>>> For me it seems like a bug and inconsistent behavior.
>>> I've provided code with different scenarios and the correct one.
>>>
>>> JUnit code with the issue <https://gist.github.com/Anatolik/9619710>
>>>
>>> Another one point - for some reason if I call actorSelection.tell from
>>> inside Worker Actor -> messages got delivered to the target ChildActor.
>>> But, I see some errors in dead letters office:
>>> 15:08:21.916 INFO [default-akka.actor.default-dispatcher-3]
>>> a.a.EmptyLocalActorRef - Message [java.lang.String] from
>>> TestActor[akka://default/user/$$a] to 
>>> Actor[akka://default/user/$$a/ForwardingActor]
>>> was not delivered. [1] dead letters encountered. This logging can be turned
>>> off or adjusted with configuration settings 'akka.log-dead-letters' and
>>> 'akka.log-dead-letters-during-shutdown'.
>>>
>>> Any ideas?
>>>
>>> --
>>> >>>>>>>>>> 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.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
>>   --
> >>>>>>>>>> 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.
>



-- 

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

-- 
>>>>>>>>>>      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