You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And pipe all messages directly to DeadLetters - Akka returns a reference to a static ActorRef.NoSender instance and this is the same idea. That way, rather than throw an exception, messages just get piped into the undeliverables pile.
Thoughts?
The text was updated successfully, but these errors were encountered:
Yes, I checked the impl for getSingleChild on actorref, actorcell and actorselection, they all point to this method:
overridedefgetSingleChild(name: String):InternalActorRef=if (name.indexOf('#') ==-1) {
// optimization for the non-uid case
getChildByName(name) match {
caseSome(crs: ChildRestartStats) ⇒ crs.child.asInstanceOf[InternalActorRef]
case _ ⇒Nobody
So you are correct :)
ActorCell.Child(...) in pigeon needs to be refactored to behave (and renamed) according to the scala code
I made ActorCell.Child(string name) use the extension to resolve Nobody, so we don't get null refs back from this.
In Akka, there are multiple methods for this, "Child(string name)" in their case, returns "some/none" FP style.. while getSingleChild returns Nobody if not found. ¨
Not sure if we need to make a distinction on this here?
@rogeralsing nah, seems like semantics. This is a good solution for the time being.
One thing we should consider adding (saw this in Akka) is an EmptyLocalAftorRef for this scenario - subclasses from LocalActorRef and just redirects all messages directly to DeadLetters. Seems like a good solution for being able to help debug scenarios where a Pigeon user is sending messages to a child that doesn't actually exist.
And pipe all messages directly to
DeadLetters
- Akka returns a reference to a staticActorRef.NoSender
instance and this is the same idea. That way, rather than throw an exception, messages just get piped into the undeliverables pile.Thoughts?
The text was updated successfully, but these errors were encountered: