我正在使用 Akka 持久性构建一个应用程序。
我必须正确检测和处理持久性故障。这怎么可能?它会抛出任何持久性异常吗?
这是我到目前为止所拥有的
override def receiveRecover: Receive = {
...
}
override def receiveCommand: Receive = {
case WorkIsDone(workerId, workId, result) =>
persist(WorkDone(workId, result)) { event =>
workData = workData.updated(WorkDone(workId, result))
}
...
}