-
Hey! I have some doubt related to using As it stands, I'm passing the supervisor's reference again to the child for those domain messages, essentially double-dipping on the supervisor reference in Is there a more elegant solution I'm overlooking? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It does not give a strongly typed message channel to the child from the parent. If you want that I'd suggest passing it as part of the child actor's startup arguments. There's too many generics at play, etc, in order to pass an Unfortunately there isn't a smarter way today. Unless you manually "link" the actors together (so start the child unlinked, then link it after the fact) however the risks any work specified in |
Beta Was this translation helpful? Give feedback.
It does not give a strongly typed message channel to the child from the parent. If you want that I'd suggest passing it as part of the child actor's startup arguments.
There's too many generics at play, etc, in order to pass an
ActorRef
downstream into the non-strongly-typed logic at the core ofractor
.Unfortunately there isn't a smarter way today. Unless you manually "link" the actors together (so start the child unlinked, then link it after the fact) however the risks any work specified in
post_start
causing an error on the child and not be captured in the supervision flow as a potential race condition. By usingspawn_linked
, it's guaranteed that an error inpre_start
will immediately …