fix routing of remote messages bouncing nodes (there may be pathological cases ...)
- RemoteCommunicationSpec last test currently failing, lookup of deployment must be fixed to work zig-zag across nodes - commit mainly to merge with Henrik’s router work and get the surface clean
This commit is contained in:
parent
e5bd8b5f88
commit
a20aad4a5b
3 changed files with 120 additions and 66 deletions
|
|
@ -254,6 +254,8 @@ class RemoteMessage(input: RemoteMessageProtocol, remote: RemoteSupport, classLo
|
|||
|
||||
def provider = remote.system.asInstanceOf[ActorSystemImpl].provider
|
||||
|
||||
def originalReceiver = input.getRecipient.getPath
|
||||
|
||||
lazy val sender: ActorRef =
|
||||
if (input.hasSender) provider.actorFor(provider.rootGuardian, input.getSender.getPath)
|
||||
else remote.system.deadLetters
|
||||
|
|
@ -332,6 +334,12 @@ trait RemoteMarshallingOps {
|
|||
throw new SecurityException("RemoteModule server is operating is untrusted mode, can not pass on a AutoReceivedMessage to the remote actor")
|
||||
case m ⇒ l.!(m)(remoteMessage.sender)
|
||||
}
|
||||
case r: RemoteActorRef ⇒
|
||||
remoteMessage.originalReceiver match {
|
||||
case RemoteActorPath(address, _) if address == remote.remoteDaemon.path.address ⇒
|
||||
r.!(remoteMessage.payload)(remoteMessage.sender)
|
||||
case r ⇒ log.error("dropping message {} for non-local recipient {}", remoteMessage.payload, r)
|
||||
}
|
||||
case r ⇒ log.error("dropping message {} for non-local recipient {}", remoteMessage.payload, r)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue