Search Results for

    Show / Hide Table of Contents

    Namespace Akka.Persistence.Query

    Classes

    EventEnvelope

    Event wrapper adding meta data for the events in the result stream of IEventsByTagQuery query, or similar queries.

    The Timestamp is the time the event was stored, in ticks. The value of this property represents the number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001 in the Gregorian calendar (same as `DateTime.Now.Ticks`).

    FromEnd

    Corresponds to a relative offset that begins the query at the Count-th event from the end of history (inclusive), e.g. "give me the last 10 events" for a tag or across all events.

    Unlike Sequence and TimeBasedUuid, FromEnd is a query input only: it is never returned in an EventEnvelope. Each EventEnvelope still carries a concrete Sequence offset, so to resume a stream at a later point you use that absolute offset, not a FromEnd value. Because it is relative rather than absolute, FromEnd is not orderable and CompareTo(Offset) always throws.

    The from-the-end position is resolved to a concrete start offset when the query is materialized, by reading how many matching events exist at that moment. For a live query (or any backend that resolves the count and reads the events in separate steps) this is best-effort: events written between resolving the count and reading the first batch may widen the initial window beyond Count.

    Not all read journals support this offset type. Implementations that cannot honor it will throw when it is supplied, the same way they reject any other unsupported offset type.

    NoOffset

    Used when retrieving all events.

    Offset

    Used in IEventsByTagQuery implementations to signal to Akka.Persistence.Query where to begin and end event by tag queries.

    For concrete implementations, see Sequence(long), NoOffset() and FromEnd.

    PersistenceQuery

    PersistenceQueryExtensions

    PersistenceQueryProvider

    Sequence

    Corresponds to an ordered sequence number for the events.Note that the corresponding offset of each event is provided in the EventEnvelope, which makes it possible to resume the stream at a later point from a given offset.

    The `offset` is exclusive, i.e.the event with the exact same sequence number will not be included in the returned stream. This means that you can use the offset that is returned in EventEnvelope as the `offset` parameter in a subsequent query.

    TimeBasedUuid

    Corresponds to an ordered unique identifier of the events. Note that the corresponding offset of each event is provided in the EventEnvelope, which makes it possible to resume the stream at a later point from a given offset.

    The `offset` is exclusive, i.e. the event with the exact same sequence number will not be included in the returned stream. This means that you can use the offset that is returned in `EventEnvelope` as the `offset` parameter in a subsequent query.

    Interfaces

    IAllEventsQuery

    ICurrentAllEventsQuery

    ICurrentEventsByPersistenceIdQuery

    A plugin may optionally support this query by implementing this trait.

    ICurrentEventsByTagQuery

    A plugin may optionally support this query by implementing this trait.

    ICurrentPersistenceIdsQuery

    A plugin may optionally support this query by implementing this trait.

    IEventsByPersistenceIdQuery

    A plugin may optionally support this query by implementing this trait.

    IEventsByTagQuery

    A plugin may optionally support this query by implementing this trait.

    IPersistenceIdsQuery

    IReadJournal

    API for reading persistent events and information derived from stored persistent events.

    The purpose of the API is not to enforce compatibility between different journal implementations, because the technical capabilities may be very different. The interface is very open so that different journals may implement specific queries.

    There are a few pre-defined queries that a query implementation may implement, such as IEventsByPersistenceIdQuery, IPersistenceIdsQuery and IEventsByTagQuery Implementation of these queries are optional and query (journal) plugins may define their own specialized queries by implementing other methods.

    var journal = PersistenceQuery.Get(system).ReadJournalFor<SomeCoolReadJournal>(queryPluginConfigPath) var events = journal.Query(new EventsByTag("mytag", 0L))

    IReadJournalProvider

    A query plugin must implement a class that implements this interface. A read journal plugin must provide implementations for IReadJournal.

    In this article
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET