IsExpiredCallback: ((pub) => boolean | number)

Callback to determine if a publication is expired.

Type declaration

    • (pub): boolean | number
    • Parameters

      Returns boolean | number

Remarks

The callback can return either:

  • boolean to indicate whether the publication is expired.
  • number, interpreted as Unix timestamp (milliseconds) of publication creation time. The publication is considered expired if this timestamp is before NOW - (maxPubLifetime+maxClockSkew) or after NOW + maxClockSkew.