Dead letter queue
Akka publish message to dlq when:
- akka didn't manage to send message to a local actor
- network connection between two nodes is lost, messages sent to the remote node ends in the dlq
- actor on remote node doesn't exist by the time the message is delivered. Akka sends a message to the dlq on the remote system.
Could use dlq to retry or take action. However it won't guarantee delivery as some message delivery failure won't be detected by Akka and:
- actor doesn't receive message because it is in the process of termination.
- connection failuring during the message transport across the wire.
Dlq is mostly used for troubleshooting, investigation, monitoring. You may want to aggregate dlq of different node using an aggregator in a ClusterSingletonManager.
Guarantee delivery is a tradeoff between throughput and making sure all messages are delivered.