Class StartAtSpec
java.lang.Object
org.apache.pulsar.reactive.client.api.StartAtSpec
- Direct Known Subclasses:
InstantStartAtSpec
,MessageIdStartAtSpec
Spec to specify to a
ReactiveMessageReader
from where to start reading.- See Also:
-
ReaderBuilder.startMessageId(MessageId)
ReaderBuilder.startMessageFromRollbackDuration(long, TimeUnit)
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageIdStartAtSpec
Gets a spec to start from the oldest message available in the topic.static InstantStartAtSpec
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
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 Details
-
ofEarliest
Gets a spec to start from the oldest message available in the topic.- Returns:
- the start spec
- See Also:
-
MessageId.earliest
-
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
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
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
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)
-