mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-15 01:15:01 +00:00
Replace TopicPartitionList class with a vector of TopicPartition
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
#include "exceptions.h"
|
||||
#include "topic_configuration.h"
|
||||
#include "topic.h"
|
||||
#include "topic_partition_list.h"
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
using std::chrono::milliseconds;
|
||||
|
||||
namespace cppkafka {
|
||||
@@ -21,14 +23,16 @@ KafkaHandleBase::KafkaHandleBase(rd_kafka_t* handle)
|
||||
}
|
||||
|
||||
void KafkaHandleBase::pause_partitions(const TopicPartitionList& topic_partitions) {
|
||||
TopicPartitionsListPtr topic_list_handle = convert(topic_partitions);
|
||||
rd_kafka_resp_err_t error = rd_kafka_pause_partitions(get_handle(),
|
||||
topic_partitions.get_handle());
|
||||
topic_list_handle.get());
|
||||
check_error(error);
|
||||
}
|
||||
|
||||
void KafkaHandleBase::resume_partitions(const TopicPartitionList& topic_partitions) {
|
||||
TopicPartitionsListPtr topic_list_handle = convert(topic_partitions);
|
||||
rd_kafka_resp_err_t error = rd_kafka_resume_partitions(get_handle(),
|
||||
topic_partitions.get_handle());
|
||||
topic_list_handle.get());
|
||||
check_error(error);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user