pulsar-client-cpp
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
pulsar::MessageId Class Reference

Public Member Functions

MessageIdoperator= (const MessageId &)
 
 MessageId (int32_t partition, int64_t ledgerId, int64_t entryId, int32_t batchIndex)
 
void serialize (std::string &result) const
 
const std::string & getTopicName () const
 
void setTopicName (const std::string &topicName)
 
bool operator< (const MessageId &other) const
 
bool operator<= (const MessageId &other) const
 
bool operator> (const MessageId &other) const
 
bool operator>= (const MessageId &other) const
 
bool operator== (const MessageId &other) const
 
bool operator!= (const MessageId &other) const
 
int64_t ledgerId () const
 
int64_t entryId () const
 
int32_t batchIndex () const
 
int32_t partition () const
 
int32_t batchSize () const
 

Static Public Member Functions

static const MessageIdearliest ()
 
static const MessageIdlatest ()
 
static MessageId deserialize (const std::string &serializedMessageId)
 

Friends

class ConsumerImpl
 
class ReaderImpl
 
class Message
 
class MessageImpl
 
class Commands
 
class PartitionedProducerImpl
 
class MultiTopicsConsumerImpl
 
class UnAckedMessageTrackerEnabled
 
class BatchAcknowledgementTracker
 
class PulsarWrapper
 
class PulsarFriend
 
class NegativeAcksTracker
 
class MessageIdBuilder
 
class ChunkMessageIdImpl
 
PULSAR_PUBLIC std::ostream & operator<< (std::ostream &s, const MessageId &messageId)
 

Constructor & Destructor Documentation

◆ MessageId()

pulsar::MessageId::MessageId ( int32_t  partition,
int64_t  ledgerId,
int64_t  entryId,
int32_t  batchIndex 
)
explicit
Deprecated:

Construct the MessageId

NOTE: This API still exists for backward compatibility, use MessageIdBuilder instead.

Parameters
partitionthe partition number of a topic
ledgerIdthe ledger id
entryIdthe entry id
batchIndexthe batch index of a single message in a batch

Member Function Documentation

◆ deserialize()

static MessageId pulsar::MessageId::deserialize ( const std::string &  serializedMessageId)
static

Deserialize a message id from a binary string

◆ earliest()

static const MessageId & pulsar::MessageId::earliest ( )
static

MessageId representing the "earliest" or "oldest available" message stored in the topic

◆ getTopicName()

const std::string & pulsar::MessageId::getTopicName ( ) const

Get the topic Name from which this message originated from

Returns
the topic name or an empty string if there is no topic name

◆ latest()

static const MessageId & pulsar::MessageId::latest ( )
static

MessageId representing the "latest" or "last published" message in the topic

◆ serialize()

void pulsar::MessageId::serialize ( std::string &  result) const

Serialize the message id into a binary string for storing

◆ setTopicName()

void pulsar::MessageId::setTopicName ( const std::string &  topicName)

Set the topicName

Deprecated:
This method will be eventually removed

The documentation for this class was generated from the following file: