librdkafka
The Apache Kafka C/C++ client library
|
Topic+Partition. More...
#include <rdkafkacpp.h>
Public Member Functions | |
virtual const std::string & | topic () const =0 |
virtual int | partition () const =0 |
virtual int64_t | offset () const =0 |
virtual void | set_offset (int64_t offset)=0 |
Set offset. | |
virtual ErrorCode | err () const =0 |
virtual int32_t | get_leader_epoch ()=0 |
Get partition leader epoch, or -1 if not known or relevant. | |
virtual void | set_leader_epoch (int32_t leader_epoch)=0 |
Set partition leader epoch. | |
Static Public Member Functions | |
static TopicPartition * | create (const std::string &topic, int partition) |
Create topic+partition object for topic and partition . More... | |
static TopicPartition * | create (const std::string &topic, int partition, int64_t offset) |
Create topic+partition object for topic and partition with offset offset . More... | |
static void | destroy (std::vector< TopicPartition * > &partitions) |
Destroy/delete the TopicPartitions in partitions and clear the vector. | |
Topic+Partition.
This is a generic type to hold a single partition and various information about it.
Is typically used with std::vector<RdKafka::TopicPartition*> to provide a list of partitions for different operations.
|
static |
Create topic+partition object for topic
and partition
.
Use delete
to deconstruct.
|
static |
Create topic+partition object for topic
and partition
with offset offset
.
Use delete
to deconstruct.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |