I\'ve created an Actor that performs some basic operations and appears to be working correctly - however I\'m seeing the following show up in my logs regularly
[
As mentioned in the comment by @wingedsubmariner, you can subscribe to the DeadLetter
event on the main system EventStream
to be notified when deadletters happen and be able to react to that situation in a more custom manner. In order to subscribe, the code would look like this:
context.system.eventStream.subscribe(myListenerActorRef, classOf[DeadLetter])
Then, the receive for that listener actor could look something like this:
def receive = {
case DeadLetter(msg, from, to) =>
//Do my custom stuff here
}
The structure of the DeadLetter
class is:
case class DeadLetter(message: Any, sender: ActorRef, recipient: ActorRef)