Class StartAtSpec
- java.lang.Object
-
- org.apache.pulsar.reactive.client.api.StartAtSpec
-
- Direct Known Subclasses:
InstantStartAtSpec
,MessageIdStartAtSpec
public abstract class StartAtSpec extends java.lang.Object
Spec to specify to aReactiveMessageReader
from where to start reading.- See Also:
ReaderBuilder.startMessageId(MessageId)
,ReaderBuilder.startMessageFromRollbackDuration(long, TimeUnit)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MessageIdStartAtSpec
ofEarliest()
Gets a spec to start from the oldest message available in the topic.static InstantStartAtSpec
ofInstant(java.time.Instant instant)
Gets a spec to start from an instant in time.static MessageIdStartAtSpec
ofLatest()
Gets a spec to start from the next message that will be available in the topic.static MessageIdStartAtSpec
ofLatestInclusive()
Gets a spec to start from the most recently published message in the topic, including that message.static MessageIdStartAtSpec
ofMessageId(org.apache.pulsar.client.api.MessageId messageId)
Gets a spec to start from a message id, not including that message.static MessageIdStartAtSpec
ofMessageId(org.apache.pulsar.client.api.MessageId messageId, boolean inclusive)
Gets a spec to start from a message id.
-
-
-
Method Detail
-
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 frominclusive
- 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(java.time.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)
-
-