@PublicEvolving @FunctionalInterface public interface StartCursor extends Serializable
This class would be used only for SubscriptionType.Exclusive
and SubscriptionType.Failover
.
Modifier and Type | Method and Description |
---|---|
static StartCursor |
defaultStartCursor() |
static StartCursor |
earliest() |
static StartCursor |
fromMessageId(org.apache.pulsar.client.api.MessageId messageId)
Find the available message id and start consuming from it.
|
static StartCursor |
fromMessageId(org.apache.pulsar.client.api.MessageId messageId,
boolean inclusive) |
static StartCursor |
fromMessageTime(long timestamp)
Deprecated.
Use
fromPublishTime(long) instead. |
static StartCursor |
fromPublishTime(long timestamp)
Seek the start position by using message publish time.
|
static StartCursor |
latest() |
CursorPosition |
position(String topic,
int partitionId) |
CursorPosition position(String topic, int partitionId)
static StartCursor defaultStartCursor()
static StartCursor earliest()
static StartCursor latest()
static StartCursor fromMessageId(org.apache.pulsar.client.api.MessageId messageId)
MessageId.earliest
or MessageId.latest
.static StartCursor fromMessageId(org.apache.pulsar.client.api.MessageId messageId, boolean inclusive)
messageId
- Find the available message id and start consuming from it.inclusive
- true
would include the given message id if it's not the MessageId.earliest
or MessageId.latest
.@Deprecated static StartCursor fromMessageTime(long timestamp)
fromPublishTime(long)
instead.static StartCursor fromPublishTime(long timestamp)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.