NoSQLStreamMode

NoSQLStreamMode is the subscription stream mode used to configure the starting point for a NoSQL subscription.

Once you have taken a checkpoint, you indicate where you want event consumption to begin by specifying a NoSQLStreamMode to NoSQLSubscriptionConfig.Builder.setStreamMode(). For example, if you specify NoSQLStreamMode.FROM_EXACT_CHECKPOINT, then events will begin at the stream position identified by the checkpoint saved in the checkpoint table.

The stream positions available to you are:

  • FROM_CHECKPOINT

    Starts the stream from the last checkpoint saved in the checkpoint table, using the next available position for shards where the checkpoint position is not available.

  • FROM_EXACT_CHECKPOINT

    Starts the stream from the last checkpoint saved in the checkpoint table, signaling an exception if the checkpoint position is not available.

  • FROM_EXACT_STREAM_POSITION

    Starts the stream from the specified start stream position, signaling an exception if the requested position is not available.

  • FROM_NOW

    Starts the stream from the latest available stream position.

  • FROM_STREAM_POSITION

    Starts the stream from the specified start stream position, using the next available position for shards where the requested position is not available.

See NoSQLStreamMode in the Java Direct Driver API Reference.