Click or drag to resize
Akka.NETIAsyncRecovery Interface
TBD

Namespace:  Akka.Persistence.Journal
Assembly:  Akka.Persistence (in Akka.Persistence.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax
public interface IAsyncRecovery

The IAsyncRecovery type exposes the following members.

Methods
  NameDescription
Public methodReadHighestSequenceNrAsync
Asynchronously reads the highest stored sequence number for provided persistenceId. The persistent actor will use the highest sequence number after recovery as the starting point when persisting new events. This sequence number is also used as `toSequenceNr` in subsequent calls to ReplayMessagesAsync(IActorContext, String, Int64, Int64, Int64, ActionIPersistentRepresentation) unless the user has specified a lower `toSequenceNr`. Journal must maintain the highest sequence number and never decrease it. This call is protected with a circuit-breaker. Please also not that requests for the highest sequence number may be made concurrently to writes executing for the same persistenceId, in particular it is possible that a restarting actor tries to recover before its outstanding writes have completed.
Public methodReplayMessagesAsync
Asynchronously replays persistent messages. Implementations replay a message by calling recoveryCallback. The returned task must be completed when all messages (matching the sequence number bounds) have been replayed. The task must be completed with a failure if any of the persistent messages could not be replayed. The toSequenceNr is the lowest of what was returned by ReadHighestSequenceNrAsync(String, Int64) and what the user specified as recovery Recovery parameter. This does imply that this call is always preceded by reading the highest sequence number for the given persistenceId. This call is NOT protected with a circuit-breaker because it may take a long time to replay all events. The plugin implementation itself must protect against an unresponsive backend store and make sure that the returned Task is completed with success or failure within reasonable time. It is not allowed to ignore completing the Task.
Top
See Also