@PublicEvolving public final class CursorPosition extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
CursorPosition.Type
The position type for reader to choose whether timestamp or message id as the start position.
|
Constructor and Description |
---|
CursorPosition(Long timestamp) |
CursorPosition(org.apache.pulsar.client.api.MessageId messageId) |
Modifier and Type | Method and Description |
---|---|
org.apache.pulsar.client.api.MessageId |
getMessageId() |
void |
seekPosition(org.apache.pulsar.client.api.Consumer<?> consumer)
Pulsar consumer could be subscribed by the position.
|
String |
toString() |
public CursorPosition(@Nullable org.apache.pulsar.client.api.MessageId messageId)
@VisibleForTesting public org.apache.pulsar.client.api.MessageId getMessageId()
public void seekPosition(org.apache.pulsar.client.api.Consumer<?> consumer) throws org.apache.pulsar.client.api.PulsarClientException
org.apache.pulsar.client.api.PulsarClientException
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.