akka - Overriding balancing pool router supervisor strategy doesn't work -


my worker code:

def receive = {   case msg =>     throw new exception("test exception escalation") } 

my controller (parent) code:

val strategy = oneforonestrategy() {   case _: exception  => escalate   case _             => escalate }  val router: actorref =   context.actorof(props[worker].withrouter(fromconfig().withsupervisorstrategy(strategy)), name = "router")  def receive = {   case ex: exception =>     log.info(ex.tostring) } 

however, whenever send message worker, restarts instead of escalating parent. seems overriding not working.

any idea please? thanks!

escalating failure not mean exception sent message parent actor the parent actors supervision strategy used determine do.

your controller/parent actor not override supervisionstrategy , therefore has default strategy restart on exception.


Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -