Interface IEventsByPersistenceIdQuery
A plugin may optionally support this query by implementing this trait.
Namespace: Akka.Persistence.Query
Assembly: Akka.Persistence.Query.dll
Syntax
public interface IEventsByPersistenceIdQuery : IReadJournal
Methods
| Improve this Doc View SourceEventsByPersistenceId(String, Int64, Int64)
Query events for a specific PersistentActor identified by persistenceId
.
You can retrieve a subset of all events by specifying fromSequenceNr
and toSequenceNr
or use 0L
and long.MaxValue respectively to retrieve all events.
The stream is not completed when it reaches the end of the currently stored events, but it continues to push new events when new events are persisted. Corresponding query that is completed when it reaches the end of the currently stored events is provided by CurrentEventsByPersistenceId(String, Int64, Int64).
Declaration
Source<EventEnvelope, NotUsed> EventsByPersistenceId(string persistenceId, long fromSequenceNr, long toSequenceNr)
Parameters
Type | Name | Description |
---|---|---|
String | persistenceId | |
Int64 | fromSequenceNr | |
Int64 | toSequenceNr |
Returns
Type | Description |
---|---|
Source<EventEnvelope, NotUsed> |