@cbnsndwch/zero-sources

IWatermarkService interface

Home > @cbnsndwch/zero-contracts > IWatermarkService

IWatermarkService interface

Data contract for a Watermark-to-Resume-Token mapping service.

Provides an simple API to convert MongoDB change stream resume tokens to Zero watermark strings and vice versa.

Signature:

interface IWatermarkService

Methods

Method

Description

getOrCreateWatermark(shardId, resumeToken)

Retrieves an existing watermark for the given shard ID and a change source's native resume token value, or creates a new one if one cannot be retrieved.

getResumeToken(shardId, watermark)

Retrieves the change source's native resume token for a given shard Id and watermark value.

How was this page?