Hi Kostas,

serialized ActorRef contain UID which indicates an incarnation
<http://doc.akka.io/docs/akka/2.4.0/scala/actors.html#Actor_Lifecycle> of
particular actor.

res8: akka.actor.ActorRef = Actor[akka://repl/user/$a#1452319393]

When you restart your actor system newly created actors have the same path
but they have a different UID and a message sent to such deserialized
ActorRef ends up in dead letters.

What you have to do is to resolve these new UIDs that have been assigned to
new actors. You can do that, as you correctly hinted to, by using actor
selection.

val f: Future[ActorRef] = system.actorSelection(oldRef.path).resolveOne

On Thu, Nov 5, 2015 at 4:02 PM, Kostas kougios <
kostas.koug...@googlemail.com> wrote:

> I could ofcourse do an actorSelection but is there an easier way?
>
> --
> >>>>>>>>>> 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