Hi Roland, Yes, you are right, the task need to send a explicit "TASK_SUCESS_FINISH" message to notify the subscribe that task finish normally, all other cases is abnormal. The only pain point in this case is that I have to write the subscription twice. First the subscriber register it self as a subscriber so that it can receive "TASK_SUCESS_FINISH" message, second it also need to context.watch to watch for abnormal termination.
Another good use case of addressTerminated=true is that I can notify the system user probably the network is down, and need to be checked. On Sunday, July 27, 2014 5:17:23 PM UTC+8, rkuhn wrote: > > The question then is: which meaning do you attribute to that flag in the > context of your application? Because receiving a Terminated with > addressTerminated=true does not preclude that the actor meanwhile > terminated normally on the partitioned remote node—you simply cannot know. > > What I am getting at is that you can choose to optimize those two cases > differently, but as soon as your program depends on this boolean for > correctness you are in trouble. > > Regards, > > Roland > > 26 jul 2014 kl. 21:21 skrev Sean Zhong <[email protected] <javascript:>>: > > Ah, I find out! > > addressTerminated seems to server this purpose. > > addressTerminated the Terminated message was derived from that the remote > node hosting the watched actor was detected as unreachable > > Terminated private[akka] (@BeanProperty actor: ActorRef)( > @BeanProperty val existenceConfirmed: Boolean, > @BeanProperty val addressTerminated: Boolean) > > On Sunday, July 27, 2014 2:55:38 AM UTC+8, Sean Zhong wrote: >> >> fix typo >> >> A remote supervise B, A watch B >> >> There are two scenarios: >> 1. normal: inside B, call context.stop(self) when B finish its work >> 2. abnormal: the network connection between A and B is down >> >> A will receive a Terminated message, how can A know the Terminated >> message is caused by "1" or "2"? >> > > -- > >>>>>>>>>> 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] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > 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.
