1

我正在使用 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))
        }

...     
}
4

1 回答 1

3

When an error occurs it will throw an onPersistFailure

More information on akka persistence failure section and also take a look at the different handlers when an error occurs Persistence_status_handling

于 2015-09-25T05:15:14.170 回答