Topic handle.  
 More...
#include <rdkafkacpp.h>
|  | 
| virtual std::string | name () const =0 | 
|  | 
| virtual bool | partition_available (int32_t partition) const =0 | 
|  | 
| virtual ErrorCode | offset_store (int32_t partition, int64_t offset)=0 | 
|  | Store offset offset+ 1 for topic partitionpartition. The offset will be committed (written) to the broker (or file) according toauto.commit.interval.msor next manual offset-less commit call.
 | 
|  | 
| virtual struct rd_kafka_topic_s * | c_ptr ()=0 | 
|  | Returns the underlying librdkafka C rd_kafka_topic_t handle. 
 | 
|  | 
|  | 
| static Topic * | create (Handle *base, const std::string &topic_str, const Conf *conf, std::string &errstr) | 
|  | Creates a new topic handle for topic named topic_str.
 | 
|  | 
◆ create()
  
  | 
        
          | static Topic * RdKafka::Topic::create | ( | Handle * | base, |  
          |  |  | const std::string & | topic_str, |  
          |  |  | const Conf * | conf, |  
          |  |  | std::string & | errstr |  
          |  | ) |  |  |  | static | 
 
Creates a new topic handle for topic named topic_str. 
conf is an optional configuration for the topic that will be used instead of the default topic configuration. The conf object is reusable after this call.
- Returns
- the new topic handle or NULL on error (see errstr).
 
 
◆ name()
  
  | 
        
          | virtual std::string RdKafka::Topic::name | ( |  | ) | const |  | pure virtual | 
 
 
◆ partition_available()
  
  | 
        
          | virtual bool RdKafka::Topic::partition_available | ( | int32_t | partition | ) | const |  | pure virtual | 
 
- Returns
- true if partitionis available for the topic (has leader).
- Warning
- MUST ONLY be called from within a RdKafka::PartitionerCb callback. 
 
 
◆ offset_store()
  
  | 
        
          | virtual ErrorCode RdKafka::Topic::offset_store | ( | int32_t | partition, |  
          |  |  | int64_t | offset |  
          |  | ) |  |  |  | pure virtual | 
 
Store offset offset + 1 for topic partition partition. The offset will be committed (written) to the broker (or file) according to auto.commit.interval.ms or next manual offset-less commit call. 
- Deprecated:
- This API lacks support for partition leader epochs, which makes it at risk for unclean leader election log truncation issues. Use KafkaConsumer::offsets_store() or Message::offset_store() instead.
- Returns
- RdKafka::ERR_NO_ERROR on success or an error code if none of the offsets could be stored. 
 
 
◆ c_ptr()
  
  | 
        
          | virtual struct rd_kafka_topic_s * RdKafka::Topic::c_ptr | ( |  | ) |  |  | pure virtual | 
 
Returns the underlying librdkafka C rd_kafka_topic_t handle. 
- Warning
- Calling the C API on this handle is not recommended and there is no official support for it, but for cases where the C++ API does not provide the underlying functionality this C handle can be used to interact directly with the core librdkafka API.
- Returns
- rd_kafka_topic_t*
 
 
◆ PARTITION_UA
  
  | 
        
          | const int32_t RdKafka::Topic::PARTITION_UA |  | static | 
 
Unassigned partition. 
The unassigned partition is used by the producer API for messages that should be partitioned using the configured or default partitioner. 
 
 
◆ OFFSET_BEGINNING
  
  | 
        
          | const int64_t RdKafka::Topic::OFFSET_BEGINNING |  | static | 
 
Special offsets. 
Consume from beginning 
 
 
◆ OFFSET_END
  
  | 
        
          | const int64_t RdKafka::Topic::OFFSET_END |  | static | 
 
 
◆ OFFSET_STORED
  
  | 
        
          | const int64_t RdKafka::Topic::OFFSET_STORED |  | static | 
 
 
◆ OFFSET_INVALID
  
  | 
        
          | const int64_t RdKafka::Topic::OFFSET_INVALID |  | static | 
 
 
The documentation for this class was generated from the following file: