Hi Nils,

actor UID does not change if that actor is restarted by the Supervision
Strategy of its parent.

Maybe in your situation child's parent was restarted because of child's
parent's parent supervision strategy? In that case child UID would have
been changed, because child would not have been restarted but rather
stopped (and started again, if that is in the child's parent preStart or
constructor code).

The above is quite speculative because I am not sure about actor hierarchy
in your program. If that does not make sense please provide more
information about your use case.

On Wed, Nov 12, 2014 at 10:04 AM, <nil...@gmail.com> wrote:

> It's not quite clear to me at which point an ActorRef changes it's uid.
> The doc says:
>
> "An actor incarnation is identified by the path and a UID. A restart only
> swaps the Actor instance defined by the Props but the incarnation and hence
> the UID remains the same."
>
> I have a child actor that is restarted by a parent (due to an exception
> and the supervisor strategy), and when it is restarted, the uid also
> changes, which is not how I read the above statement? I was planning to use
> the uid in a Future that is spawned by the actor, to make sure that the
> actor instance is the same when the future completes, as the actor could
> have been restarted while the future is running. Would it be considered to
> be an anti pattern to use and rely on the uid this way, or is it a valid
> approach?
>
> Nils-H
>
>
>  --
> >>>>>>>>>> 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 http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Martynas Mickevičius
Typesafe <http://typesafe.com/> – Reactive
<http://www.reactivemanifesto.org/> Apps on the JVM

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to