MessagesSyncOptions: {
    concurrency?: number;
    entityFilter?: ((cursor, localCursor) => boolean);
    gapCheckDelayMs?: number;
    gapCheckMinIntervalMs?: number;
    limit?: number;
    liveCursor?: boolean;
    logLevel?: Verbosity;
    maxPagesPerEntity?: number;
    store: MessagesSyncStore;
}

Type declaration

  • Optional concurrency?: number

    How many entities are pulled at the same time. Kept low to leave the connection to the live stream.

  • Optional entityFilter?: ((cursor, localCursor) => boolean)

    Decides whether a diverging entity takes part in a run, called once per entity of the summary.

    An entity the client has no cursor for would otherwise be read from the beginning of the journal, which is a whole history rather than a catch up. A client that loads such entities lazily, on opening them, filters them out here and lets a full loadMessages seed the cursor instead.

      • (cursor, localCursor): boolean
      • Parameters

        • cursor: ChatCursor

          entity and its current server cursor

        • localCursor: number

          cursor of the entity known to the synchronizer, 0 when there is none

        Returns boolean

  • Optional gapCheckDelayMs?: number

    Debounce before a gap in the live stream is checked with a difference request. Default 300 ms.

  • Optional gapCheckMinIntervalMs?: number

    Minimum interval between gap triggered difference requests of the same entity. Default 30000 ms.

  • Optional limit?: number

    Page size of a difference request, 0 to use the server default

  • Optional liveCursor?: boolean

    Advance cursors from live events. Default true.

  • Optional logLevel?: Verbosity
  • Optional maxPagesPerEntity?: number

    Safety limit of difference pages per entity and per run

  • store: MessagesSyncStore