* because it is not referentially transparent; normally we reserved parens for
side-effecting code but given how people thoughtlessly close over it we revised
that that decision for sender
* caller can still omit parens
- 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
- introducing RepointableActorRef, which starts out with an
UnstartedActorCell which can cheaply be created; the Supervise()
message will trigger child.activate() in the supervisor, which means
that the actual creation (now with normal ActorCell) happens exactly
in the right place and with the right semantics. Messages which were
enqueued to the dummy cell are transferred atomically into the
ActorCell (using normal .tell()), so message sends keep working
exactly as they used to
- this enables getting rid of the brittle synchronization around
RoutedActorRef by replacing that one with a RepointableActorRef
subclass which creates RoutedActorCells upon activate(), with the nice
benefit that there is no hurry then to get it right because the new
cell is constructed “on the side”
misc fixes:
- InvalidMessageException is now actually enforced when trying to send
“null”
- Mailboxes may be created without having an ActorCell, which can come
in handy later, because the cell is only needed when this mailbox is
going to be scheduled on some executor
- remove occurrences of Props(), which is equivalent to Props[Nothing],
which is equivalent to «bug»
- add test case which verifies that context.actorOf is still synchronous
- plus all the stuff I have forgotten.
- this enables using any MessageQueue in BalancingDispatcher,
CallingThreadDispatcher and in general leads to less conflation of
concepts
- add MessageQueue.cleanUp(owner, deadLetterQueue) for the benefit of
durable mailboxes
- change MailboxType.create to take an optional owner and generate only
a MessageQueue, not a Mailbox
* Changed signatures and constructor of MessageDispatcherConfigurator
* Changed Dispatchers.lookup, keep configurators instead of dispatchers
* Removed most of the Dispatchers.newX methods, newDispatcher is still there because of priority mailbox
* How should we make it easy to configure priority mailbox?
* Changed tons tests
* Documentation and ScalaDoc is not updated yet
* Some tests in ActorModelSpec are temporary ignored due to failure
- create ActorSystemImpl trait to make ActorSystem fully abstract
- add Java API for constructing (ActorSystem.create(...))
- only go through factory methods because .start() has become necessary
- rename all user-facing occurrences of “app” to “system” (Actor trait
and TestKit/AkkaSpec)
- pass ActorSystemImpl to ActorRefs upon creation, which means that
actorOf() and friends need such an argument, which must be provided to
the ActorRefProvider by the ActorRefFactory implementation
(since I know now what’s causing these Jenkins failures ;-) )
- include recipient in DeadLetter
- include recipient in calls to enqueue/systemEnqueue
- move DeadLetterMailbox to ActorSystem (saves some space, too)
- hook up DeadLetterMailbox so it sends DeadLetters to app.deadLetters,
which publishes them on the eventStream
- subscribe TestEventListener to DeadLetter and turn it into Warning
The generated warnings about ChildTerminated are very much correct, they
remind us that we still need to fix supervisor.stop() to await all
children’s death before actually committing suicide.
- channel field was always set to NullChannel and not used
- receiver field is better put into the Mailbox, because there it takes
space only once per actor
- leaves only the bare SystemMessage to be queued