Class StartAtSpec

java.lang.Object
org.apache.pulsar.reactive.client.api.StartAtSpec
Direct Known Subclasses:
InstantStartAtSpec, MessageIdStartAtSpec

public abstract class StartAtSpec extends Object
Spec to specify to a ReactiveMessageReader from where to start reading.
See Also:
  • ReaderBuilder.startMessageId(MessageId)
  • ReaderBuilder.startMessageFromRollbackDuration(long, TimeUnit)
  • Method Details

    • ofEarliest

      public static MessageIdStartAtSpec ofEarliest()
      Gets a spec to start from the oldest message available in the topic.
      Returns:
      the start spec
      See Also:
      • MessageId.earliest
    • ofLatest

      public static MessageIdStartAtSpec ofLatest()
      Gets a spec to start from the next message that will be available in the topic.
      Returns:
      the start spec
      See Also:
      • MessageId.latest
    • ofLatestInclusive

      public static MessageIdStartAtSpec ofLatestInclusive()
      Gets a spec to start from the most recently published message in the topic, including that message.
      Returns:
      the start spec
      See Also:
      • MessageId.latest
      • ReaderBuilder.startMessageIdInclusive()
    • ofMessageId

      public static MessageIdStartAtSpec ofMessageId(org.apache.pulsar.client.api.MessageId messageId, boolean inclusive)
      Gets a spec to start from a message id.
      Parameters:
      messageId - the message id to start from
      inclusive - whether the message with the message id should be included
      Returns:
      the start spec
      See Also:
      • ReaderBuilder.startMessageId(MessageId)
      • ReaderBuilder.startMessageIdInclusive()
    • ofMessageId

      public static MessageIdStartAtSpec ofMessageId(org.apache.pulsar.client.api.MessageId messageId)
      Gets a spec to start from a message id, not including that message.
      Parameters:
      messageId - the message id to start from
      Returns:
      the start spec
      See Also:
      • ReaderBuilder.startMessageId(MessageId)
    • ofInstant

      public static InstantStartAtSpec ofInstant(Instant instant)
      Gets a spec to start from an instant in time.
      Parameters:
      instant - the instant to start from
      Returns:
      the start spec
      See Also:
      • ReaderBuilder.startMessageFromRollbackDuration(long, TimeUnit)