| IAsyncRecoveryReplayMessagesAsync Method |
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.
Namespace:
Akka.Persistence.Journal
Assembly:
Akka.Persistence (in Akka.Persistence.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax Task ReplayMessagesAsync(
IActorContext context,
string persistenceId,
long fromSequenceNr,
long toSequenceNr,
long max,
Action<IPersistentRepresentation> recoveryCallback
)
abstract ReplayMessagesAsync :
context : IActorContext *
persistenceId : string *
fromSequenceNr : int64 *
toSequenceNr : int64 *
max : int64 *
recoveryCallback : Action<IPersistentRepresentation> -> Task
Parameters
- context
- Type: Akka.ActorIActorContext
The contextual information about the actor processing replayed messages. - persistenceId
- Type: SystemString
Persistent actor identifier - fromSequenceNr
- Type: SystemInt64
Inclusive sequence number where replay should start - toSequenceNr
- Type: SystemInt64
Inclusive sequence number where replay should end - max
- Type: SystemInt64
Maximum number of messages to be replayed - recoveryCallback
- Type: SystemActionIPersistentRepresentation
Called to replay a message, may be called from any thread.
Return Value
Type:
TaskTBD
See Also