Stores subscriptions

  • Poll: When no active lease found, creates new consumer lease if events are found after watermark
  • Ack: Updates watermark if received before lease expiration

Hierarchy

Properties

ack: (<E>(lease, watermark) => Promise<boolean>)

Type declaration

    • <E>(lease, watermark): Promise<boolean>
    • Acknowledges consumer handling events on active lease

      Type Parameters

      Parameters

      • lease: Lease<E>

        active lease

      • watermark: number

        new watermark poiting to the last consumed event

      Returns Promise<boolean>

      false when lease expired

dispose: Disposer
drop: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Drops the store

      Returns Promise<void>

name: string
poll: (<E>(consumer, options) => Promise<undefined | Lease<E>>)

Type declaration

    • <E>(consumer, options): Promise<undefined | Lease<E>>
    • Polls the store for events created after a watermark

      Type Parameters

      Parameters

      • consumer: string

        consumer name

      • options: PollOptions

        poll options

      Returns Promise<undefined | Lease<E>>

      a new lease when events are found

seed: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Seeds the store

      Returns Promise<void>

subscriptions: (() => Promise<Subscription[]>)

Type declaration

Generated using TypeDoc