Thank you. That did the trick.
watch(subscriber1)
system.stop(subscriber1)
expectTerminated(subscriber1)
val subscriber2 = system.actorOf(props1, "name1") // New actor, same
name
subscriber2 ! Subscriber.GetState
val result2 = expectMsg(...something...)
On Thu,
On Thu, Oct 13, 2016 at 11:08 AM, Sebastian Piu
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
supervisio
Is there any way of simulating the failure while processing, or force
terminate the actor?
It if my understanding that stopping will do it after the current message
finishes right?
On Thu, 13 Oct 2016, 08:01 Patrik Nordwall,
wrote:
> The actor's name and persistenceId doesn't have to be the sam
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 wrote:
> Thanks, but if I do this:
>
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, Patr
You can stop it and start a new actor with the same persistenceId.
/Patrik
tors 13 okt. 2016 kl. 06:33 skrev Richard Rodseth :
> 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 !
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 ad