Defining AKKA Actor hierarchies -
understand akka actors derived /user guardian actor. in order take care of exceptions, define myappparent actor , have actors under actor. possible using akka. in realtime need sending messages directly child actors mailbox under myappparentactor , not through parent actor. pointers on how if possible akka.
thanks, cabear
just started looking akka. understanding (correct me wrong) question. akka has hierarchy. root guardian -> user guardian -> actor hierarchy. if want create top level actor (children of user guardian).
actorsystem system = actorsystem.create("mysystem"); actorref ref = system.actorof(props.create(toplevelactor.class);
now if want create child actor above created top level actor. instead of 'system' use actors context. eg
getcontext().actorof(props.create(childoftoplevel.class)).tell( new message(0, 200000), getself());
you can use tell method above instruct top level actor send messages child created. message won't go directly child go mailbox.
so think have context , tell.
you should read official documentation (http://akka.io/docs/). it's pretty detailed. also, still on third chapter of documentation correct me if got wrong.
Comments
Post a Comment