Interface MessageIdAdv

All Superinterfaces:
Comparable<MessageId>, MessageId, Serializable

public interface MessageIdAdv extends MessageId
The MessageId interface provided for advanced users.

All built-in MessageId implementations should be able to be cast to MessageIdAdv.

  • Method Details

    • getLedgerId

      long getLedgerId()
      Get the ledger ID.
      Returns:
      the ledger ID
    • getEntryId

      long getEntryId()
      Get the entry ID.
      Returns:
      the entry ID
    • getPartitionIndex

      default int getPartitionIndex()
      Get the partition index.
      Returns:
      -1 if the message is from a non-partitioned topic, otherwise the non-negative partition index
    • getBatchIndex

      default int getBatchIndex()
      Get the batch index.
      Returns:
      -1 if the message is not in a batch
    • getBatchSize

      default int getBatchSize()
      Get the batch size.
      Returns:
      0 if the message is not in a batch
    • getAckSet

      default BitSet getAckSet()
      Get the BitSet that indicates which messages in the batch.
      Returns:
      null if the message is a non-batched message
    • getFirstChunkMessageId

      default MessageIdAdv getFirstChunkMessageId()
      Get the message ID of the first chunk if the current message ID represents the position of a chunked message.
      Returns:
      null if the message is not a chunked message
    • compareTo

      default int compareTo(MessageId o)
      The default implementation of Comparable.compareTo(Object).
      Specified by:
      compareTo in interface Comparable<MessageId>