librdkafka
The Apache Kafka C/C++ client library
RdKafka::OffsetCommitCb Class Referenceabstract

Offset Commit callback class. More...

#include <rdkafkacpp.h>

Public Member Functions

virtual void offset_commit_cb (RdKafka::ErrorCode err, std::vector< TopicPartition *> &offsets)=0
 Set offset commit callback for use with consumer groups. More...
 

Detailed Description

Offset Commit callback class.

Member Function Documentation

◆ offset_commit_cb()

virtual void RdKafka::OffsetCommitCb::offset_commit_cb ( RdKafka::ErrorCode  err,
std::vector< TopicPartition *> &  offsets 
)
pure virtual

Set offset commit callback for use with consumer groups.

The results of automatic or manual offset commits will be scheduled for this callback and is served by RdKafka::KafkaConsumer::consume() or RdKafka::KafkaConsumer::commitSync()

If no partitions had valid offsets to commit this callback will be called with err == ERR__NO_OFFSET which is not to be considered an error.

The offsets list contains per-partition information:

  • topic The topic committed
  • partition The partition committed
  • offset: Committed offset (attempted)
  • err: Commit error

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