You can watch
<http://doc.akka.io/docs/akka/2.4.0/scala/actors.html#Lifecycle_Monitoring_aka_DeathWatch>
them.
/Patrik

On Wed, Nov 11, 2015 at 8:47 PM, Vikram Kadi <[email protected]> wrote:

> Hi Roland,
>
> I have a similar question, i do prefer ActorRef since i m able to assign
> the actor references on startup in the right hierarchy.
>
> But if the underlying actor crashes and then restarts(due to the right
> recovery strategy), then the ActorRef i hold is obsolete, and all messages
> to it would end up in dead letters. How can i be notified of the
> crash-restart so i can look up the right ActorRef of the newly restarted
> actor?
>
> And all the actors are local for this particular question i have.
>
> thanks,
> Vikram
>
>
> On Monday, March 9, 2015 at 5:39:09 AM UTC-7, rkuhn wrote:
>>
>> PR: https://github.com/akka/akka/pull/17027
>>
>> 9 mar 2015 kl. 13:16 skrev Roland Kuhn <[email protected]>:
>>
>> Hi Thomas (& everyone else),
>>
>> as a general rule of thumb *always* use ActorRef. The exceptions to this
>> rule are
>>
>>    - sending via the AtLeastOnceDelivery trait
>>    - initiating first contact between remote systems
>>
>> In all other cases you’ll have ActorRefs readily available by virtue of
>> setting up the system of actors in proper hierarchical fashion, passing
>> references from parent to child and introducing actors by sending messages
>> containing ActorRefs.
>>
>> The first exception is due to at-least-once semantics being radically
>> different from normal message sends, which means that ActorRef is not the
>> right thing. The second exception is obviously due to not having an
>> ActorRef before a reply is received from the remote system.
>>
>> We should probably add this to the docs.
>>
>> Regards,
>>
>> Roland
>>
>> 9 mar 2015 kl. 12:45 skrev Thomas Zimmer <[email protected]>:
>>
>> Hi,
>>
>> i got a more conceptual question. Is it more to common to emit a message
>> to a ActorRef directly or use the ActorSelection instead? I am thinking of
>> the following use-case: I got a "business logic" actor (A) and a
>> "persistence logic" actor (B). So if i A wants to tell B to save a DB-Entry
>> would I use a ActorRef or a ActorSelection? I can only guess that
>> ActorSelection makes more sense as i could have more than one Actor to
>> process the incoming work (lets say I have 3 instances of B running in a
>> cluster). What is the the common pattern here?
>>
>> Regards,
>> Thomas
>>
>> --
>> >>>>>>>>>> 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.
>>
>>
>>
>>
>> *Dr. Roland Kuhn*
>> *Akka Tech Lead*
>> Typesafe <http://typesafe.com/> – Reactive apps on the JVM.
>> twitter: @rolandkuhn
>> <http://twitter.com/#!/rolandkuhn>
>>
>>
>> --
>> >>>>>>>>>> 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.
>>
>>
>>
>>
>> *Dr. Roland Kuhn*
>> *Akka Tech Lead*
>> Typesafe <http://typesafe.com/> – Reactive apps on the JVM.
>> twitter: @rolandkuhn
>> <http://twitter.com/#!/rolandkuhn>
>>
>> --
> >>>>>>>>>> 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