A reader group is a collection of readers that collectively read all the events in the stream. The events are distributed among the readers in the group such that each event goes to only one reader.

Note: A StreamReaderGroup cannot be created directly without using the StreamManager.

Hierarchy

  • StreamReaderGroup

Properties

create_reader: ((reader_name: string) => StreamReader)

Type declaration

    • (reader_name: string): StreamReader
    • Creates (or recreates) a new reader that is part of a StreamReaderGroup. The reader will join the group and the members of the group will automatically rebalance among themselves.

      Returns

      The StreamReader

      Parameters

      • reader_name: string

        A unique name (within the group) for this reader.

      Returns StreamReader

reader_offline: ((reader_name: string) => void)

Type declaration

    • (reader_name: string): void
    • Invoked when a reader that was added to the group is no longer consuming events. This will cause the events that were going to that reader to be redistributed among the other readers. Events after the lastPosition provided will be (re)read by other readers in the StreamReaderGroup.

      Parameters

      • reader_name: string

        The name of the reader that is offline.

      Returns void

toString: (() => string)

Type declaration

    • (): string
    • Returns string

Generated using TypeDoc