Reason is that Message confirmation targets and messages are currently not serialized by MessageSerialization. Until this issue is fixed, applications should create a local destination proxy for a remote destination. The proxy confirms a message delivery when when it receives a reply from the remote destination:
class DestinationProxy(remoteDestination: ActorRef) extends Actor { this: Receiver =>
implicit val timeout = Timeout(5 seconds)
import context.dispatcher
def receive = {
case event => {
val currentMessage = message
remoteDestination ? event onComplete {
case Success(_) => currentMessage.confirm(true)
case Failure(_) => currentMessage.confirm(false)
}
}
}
}
Reason is that
Message
confirmation targets and messages are currently not serialized by MessageSerialization. Until this issue is fixed, applications should create a local destination proxy for a remote destination. The proxy confirms a message delivery when when it receives a reply from the remote destination: