rewrite mailbox selection logic, see #3342
- add “mailbox-requirement” key to dispatcher section - split out mailbox section, add akka.actor.default-mailbox - rewrite findMarker method and use it for Props.create() and getting the required mailbox of an actor - add ProducesMessageQueue trait for MailboxType so that requirements can be checked before trying to create the actor for real - verify actor as well as dispatcher requirements for message queue before creation, even in remote-deployed case - change MessageDispatcher constructor to take a Configurator, add that to migration guide
This commit is contained in:
parent
51ed174432
commit
f317aaf711
37 changed files with 843 additions and 419 deletions
|
|
@ -272,6 +272,14 @@ private[akka] class RemoteActorRefProvider(
|
|||
} else if (props.deploy.scope == LocalScope) {
|
||||
throw new IllegalArgumentException(s"configuration requested remote deployment for local-only Props at [$path]")
|
||||
} else try {
|
||||
try {
|
||||
// for consistency we check configuration of dispatcher and mailbox locally
|
||||
val dispatcher = system.dispatchers.lookup(props.dispatcher)
|
||||
system.mailboxes.getMailboxType(props, dispatcher.configurator.config)
|
||||
} catch {
|
||||
case NonFatal(e) ⇒ throw new IllegalArgumentException(
|
||||
s"configuration problem while creating [$path] with dispatcher [${props.dispatcher}] and mailbox [${props.mailbox}]", e)
|
||||
}
|
||||
val localAddress = transport.localAddressForRemote(addr)
|
||||
val rpath = (RootActorPath(addr) / "remote" / localAddress.protocol / localAddress.hostPort / path.elements).
|
||||
withUid(path.uid)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue