improve DeadLetter reporting

(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.
This commit is contained in:
Roland 2011-11-12 10:57:28 +01:00
parent 85e37ea8ef
commit 1ba168774f
11 changed files with 96 additions and 78 deletions

View file

@ -39,13 +39,13 @@ abstract class MailboxSpec extends AkkaSpec with BeforeAndAfterAll with BeforeAn
val exampleMessage = createMessageInvocation("test")
for (i 1 to config.capacity) q.enqueue(exampleMessage)
for (i 1 to config.capacity) q.enqueue(null, exampleMessage)
q.numberOfMessages must be === config.capacity
q.hasMessages must be === true
intercept[MessageQueueAppendFailedException] {
q.enqueue(exampleMessage)
q.enqueue(null, exampleMessage)
}
q.dequeue must be === exampleMessage
@ -103,7 +103,7 @@ abstract class MailboxSpec extends AkkaSpec with BeforeAndAfterAll with BeforeAn
def createProducer(fromNum: Int, toNum: Int): Future[Vector[Envelope]] = spawn {
val messages = Vector() ++ (for (i fromNum to toNum) yield createMessageInvocation(i))
for (i messages) q.enqueue(i)
for (i messages) q.enqueue(null, i)
messages
}