Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
protected void persistenceMessage(ActorSystem system,SpringExtension ext) { new TestKit(system) {{ ActorRef probe = getRef(); //메시지 목적대상 액터 생성 final ActorRef myDestination = system.actorOf(ext.props("myDestination"),"myDes"); final ActorSelection myDes = system.actorSelection("/user/myDes"); //재전송가능한 메시지 발송기 생성 ( 옵션은 목적대상 액터선택자 ) final ActorRef myPersistentActor = system.actorOf( ext.props("myPersistentActor",myDes ), "myPersistentActor" ); for(int i=0;i<10;i++) { myPersistentActor.tell( "hi " + i ,ActorRef.noSender() ); } //장애 시나리오를 가정하고,메시지가 모두 처리되는 시간 25초로 가정 expectNoMessage(java.time.Duration.ofSeconds(25)); }}; } |
Expand | ||
---|---|---|
| ||
의도적으로 드랍한 메시지가 결국 성공됨을 확인할수가 있습니다. drop msg for test:86 |
...