On Thu, Oct 13, 2016 at 11:08 AM, Sebastian Piu <sebastian....@gmail.com> wrote:
> Is there any way of simulating the failure while processing, or force > terminate the actor? > There is a akka.actor.Kill message that will make the Actor throw an ActorKilledException, which will trigger supervision. The default supervision strategy for that exception is to stop the actor, but you can implement something else in your parent. > It if my understanding that stopping will do it after the current message > finishes right? > Yes, there is no way to interrupt the processing of current message. > > On Thu, 13 Oct 2016, 08:01 Patrik Nordwall, <patrik.nordw...@gmail.com> > wrote: > >> The actor's name and persistenceId doesn't have to be the same, but if >> you need that you must wait until it has been terminated before starting >> the new instance >> >> watch(subscriber1) >> expectTerminated(subscriber2) >> >> On Thu, Oct 13, 2016 at 7:10 AM, Richard Rodseth <rrods...@gmail.com> >> wrote: >> >> Thanks, but if I do this: >> >> system.stop(subscriber1) >> >> val subscriber2 = system.actorOf(props1, "name1") >> >> I get an error that "name1" is not unique. The actor's persistence id is: >> >> override val persistenceId: String = "subscriber-" + self.path.name >> >> On Wed, Oct 12, 2016 at 9:59 PM, Patrik Nordwall < >> patrik.nordw...@gmail.com> wrote: >> >> You can stop it and start a new actor with the same persistenceId. >> /Patrik >> tors 13 okt. 2016 kl. 06:33 skrev Richard Rodseth <rrods...@gmail.com>: >> >> I've been able to test recovery by using the in-memory journal and >> sending a "bomb" message to the actor, which is handled by throwing an >> exception : >> >> myActorRef ! DoSomething >> myActorRef ! "bomb" >> myActorRef ! GetState >> expectMsg(MyActorState(...)) >> >> Is there any way I can do this without having to add the special "bomb" >> message to the the Actor. >> >> Thanks. >> >> -- >> >>>>>>>>>> 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 https://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> >>>>>>>>>> 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 https://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> >>>>>>>>>> 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 https://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> >> >> >> >> -- >> >> Patrik Nordwall >> Akka Tech Lead >> Lightbend <http://www.lightbend.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 akka-user+unsubscr...@googlegroups.com. >> To post to this group, send email to akka-user@googlegroups.com. >> Visit this group at https://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Patrik Nordwall Akka Tech Lead Lightbend <http://www.lightbend.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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.