Hi Sylvain,

can you elaborate more on why do you need two recoveries one after another?

It is possible to disable automatic recovery by overriding preStart
<http://doc.akka.io/docs/akka/2.3.11/scala/persistence.html#Recovery_customization>
method.
Also recovery can be started from arbitrary sequence number for an
arbitrary number of events. This should be enough to have a full control
over recovery.

On Fri, May 8, 2015 at 6:58 PM, Sylvain Frey <[email protected]> wrote:

> After digging into akka.persistence.Eventsourced: *the implementation
> allows only one recovery, when the actor is started and before any commands
> are processed.* There does not seem to be a way to return to an "awaiting
> recovery" state without fiddling with the private behaviour of a
> PersistentActor.
>
> Perhaps this feature should be documented?
>
>
> Sylvain
>
>
> On Thursday, May 7, 2015 at 7:03:28 PM UTC+1, Sylvain Frey wrote:
>>
>> Am I right supposing that a PersistentActor supports only a single
>> recovery?
>>
>> For instance, with a PersistentActor that has already persisted a number
>> of events commands, when doing:
>>
>> persistentActor ! Recover(toSequenceNr = 2L)
>> persistentActor ! Recover(toSequenceNr = 1L)
>>
>> only the first recovery ever happens - and only in case it manages to get
>> in *before* the initial automatic recovery for PersistentActors,
>> otherwise it is also discarded.
>>
>> In case this is unclear, I have a minimal test case at hand.
>>
>> The bigger picture: my goal was to implement a time travelling feature
>> where actors would be sent back in time at runtime, to arbitrary past
>> states (rewinding a simulation for instance).
>>
>> Thanks!
>>
>>
>> Sylvain
>>
>>
>>  --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Martynas Mickevičius
Typesafe <http://typesafe.com/> – Reactive
<http://www.reactivemanifesto.org/> Apps on the JVM

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to