Click or drag to resize
Akka.NETAsyncWriteJournalReadHighestSequenceNrAsync Method
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.

Namespace:  Akka.Persistence.Journal
Assembly:  Akka.Persistence (in Akka.Persistence.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax
public abstract Task<long> ReadHighestSequenceNrAsync(
	string persistenceId,
	long fromSequenceNr
)

Parameters

persistenceId
Type: SystemString
Persistent actor identifier
fromSequenceNr
Type: SystemInt64
Hint where to start searching for the highest sequence number. When a persistent actor is recovering this fromSequenceNr will the sequence number of the used snapshot, or `0L` if no snapshot is used.

Return Value

Type: TaskInt64
TBD

Implements

IAsyncRecoveryReadHighestSequenceNrAsync(String, Int64)
See Also