public class MessageIdStartCursor extends Object implements StartCursor
| Constructor and Description |
|---|
MessageIdStartCursor(org.apache.pulsar.client.api.MessageId messageId,
boolean inclusive)
The default
inclusive behavior should be controlled in ConsumerBuilder.startMessageIdInclusive(). |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
CursorPosition |
position(String topic,
int partitionId) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdefaultStartCursor, earliest, fromMessageId, fromMessageId, fromMessageTime, latest, seekPositionpublic MessageIdStartCursor(org.apache.pulsar.client.api.MessageId messageId,
boolean inclusive)
inclusive behavior should be controlled in ConsumerBuilder.startMessageIdInclusive(). But pulsar has a bug and don't support this
currently. We have to use entry + 1 policy for consuming the next available message.
If the message id entry is not valid. Pulsar would automatically find next valid message id.
Please referer this
code for understanding pulsar internal logic.messageId - The message id for start position.inclusive - Should we include the start message id in consuming result.public CursorPosition position(String topic, int partitionId)
position in interface StartCursorCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.