How to control or turn off recovery in EventSourcedBehavior

I was migrating a classic persistent Actor (extending AbstractPersistentActor) to the new typed approach by extending EventSourcedBehavior. I have some situations where I want to restart an actor and start fresh (without recovering it). In the classic approach I could control that behavior, by overriding the recovery method, e.g.

public Recovery recovery() {
   // Here I could make some decisions on whether to recover and return the right Recovery object
   return Recovery.none();

But I could not find anything like that in EventSourcedBehavior. How would I skip recovery here?

That feature is in progress in

1 Like