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

#include <MessageIdBuilder.h>

Public Member Functions

MessageId build () const
 
MessageIdBuilderledgerId (int64_t ledgerId)
 
MessageIdBuilderentryId (int64_t entryId)
 
MessageIdBuilderpartition (int32_t partition)
 
MessageIdBuilderbatchIndex (int32_t batchIndex)
 
MessageIdBuilderbatchSize (int32_t batchSize)
 

Static Public Member Functions

static MessageIdBuilder from (const MessageId &messageId)
 
static MessageIdBuilder from (const proto::MessageIdData &messageIdData)
 

Detailed Description

The builder to build a MessageId.

Example of building a single MessageId:

++
.ledgerId(0L)
.entryId(0L)
.build();
Definition MessageIdBuilder.h:54
MessageId build() const
MessageIdBuilder & ledgerId(int64_t ledgerId)
MessageIdBuilder & entryId(int64_t entryId)
Definition MessageId.h:34

Example of building a batched MessageId:

++
.ledgerId(0L)
.entryId(0L)
.build();
MessageIdBuilder & batchSize(int32_t batchSize)
MessageIdBuilder & batchIndex(int32_t batchIndex)

Member Function Documentation

◆ batchIndex()

MessageIdBuilder & pulsar::MessageIdBuilder::batchIndex ( int32_t  batchIndex)

Set the batch index.

Default: -1

◆ batchSize()

MessageIdBuilder & pulsar::MessageIdBuilder::batchSize ( int32_t  batchSize)

Set the batch size.

Default: 0

◆ build()

MessageId pulsar::MessageIdBuilder::build ( ) const

Build a MessageId.

◆ entryId()

MessageIdBuilder & pulsar::MessageIdBuilder::entryId ( int64_t  entryId)

Set the entry ID field.

Default: -1L

◆ from() [1/2]

static MessageIdBuilder pulsar::MessageIdBuilder::from ( const MessageId messageId)
static

Create an instance that copies the data from messageId.

◆ from() [2/2]

static MessageIdBuilder pulsar::MessageIdBuilder::from ( const proto::MessageIdData &  messageIdData)
static

Create an instance from the proto::MessageIdData instance.

Note
It's an internal API that converts the MessageIdData defined by PulsarApi.proto
See also
https://github.com/apache/pulsar-client-cpp/blob/main/proto/PulsarApi.proto

◆ ledgerId()

MessageIdBuilder & pulsar::MessageIdBuilder::ledgerId ( int64_t  ledgerId)

Set the ledger ID field.

Default: -1L

◆ partition()

MessageIdBuilder & pulsar::MessageIdBuilder::partition ( int32_t  partition)

Set the partition index.

Default: -1


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