!per Make persistent failures fatal
* remove PersistentFailure and RecoveryFailure messages * use stop instead of ActorKilledException * adjust PersistentView * adjust AtLeastOnceDeliveryFailureSpec * adjust sharding * add BackoffSupervisor
This commit is contained in:
parent
1eaebcedb8
commit
6d26b3e591
21 changed files with 566 additions and 446 deletions
|
|
@ -100,6 +100,23 @@ object PersistenceDocSpec {
|
|||
}
|
||||
}
|
||||
|
||||
object Backoff {
|
||||
abstract class MyActor extends Actor {
|
||||
import PersistAsync.MyPersistentActor
|
||||
//#backoff
|
||||
val childProps = Props[MyPersistentActor]
|
||||
val props = BackoffSupervisor.props(
|
||||
childProps,
|
||||
childName = "myActor",
|
||||
minBackoff = 3.seconds,
|
||||
maxBackoff = 30.seconds,
|
||||
randomFactor = 0.2)
|
||||
context.actorOf(props, name = "mySupervisor")
|
||||
//#backoff
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
object AtLeastOnce {
|
||||
//#at-least-once-example
|
||||
import akka.actor.{ Actor, ActorPath }
|
||||
|
|
@ -288,4 +305,4 @@ object PersistenceDocSpec {
|
|||
//#view-update
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue