librdkafka
The Apache Kafka C/C++ client library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RdKafka::TopicPartition Class Referenceabstract

Topic+Partition. More...

#include <rdkafkacpp.h>

Public Member Functions

virtual const std::string & topic () const =0
 
virtual int partition ()=0
 
virtual int64_t offset ()=0
 
virtual void set_offset (int64_t offset)=0
 Set offset.
 
virtual ErrorCode err ()=0
 

Static Public Member Functions

static TopicPartitioncreate (const std::string &topic, int partition)
 

Detailed Description

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.

Member Function Documentation

static TopicPartition* RdKafka::TopicPartition::create ( const std::string &  topic,
int  partition 
)
static

Create topic+partition object for topic and partition.

Use delete to deconstruct.

virtual const std::string& RdKafka::TopicPartition::topic ( ) const
pure virtual
Returns
topic name
virtual int RdKafka::TopicPartition::partition ( )
pure virtual
Returns
partition id
virtual int64_t RdKafka::TopicPartition::offset ( )
pure virtual
Returns
offset (if applicable)
virtual ErrorCode RdKafka::TopicPartition::err ( )
pure virtual
Returns
error code (if applicable)

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