Added pause/resume for producers (#87)

* Added pause/resume for producers

* Moved pause/resume functions to KafkaHandleBase
This commit is contained in:
Alex Damian
2018-06-25 12:16:57 -04:00
committed by Matias Fontanini
parent 069ea3df8e
commit 5c72f3fe28
6 changed files with 39 additions and 1 deletions

View File

@@ -41,6 +41,7 @@
namespace cppkafka {
class TopicPartition;
class PartitionMetadata;
using TopicPartitionsListPtr = std::unique_ptr<rd_kafka_topic_partition_list_t,
decltype(&rd_kafka_topic_partition_list_destroy)>;
@@ -53,6 +54,8 @@ using TopicPartitionList = std::vector<TopicPartition>;
CPPKAFKA_API TopicPartitionsListPtr convert(const TopicPartitionList& topic_partitions);
CPPKAFKA_API TopicPartitionList convert(const TopicPartitionsListPtr& topic_partitions);
CPPKAFKA_API TopicPartitionList convert(rd_kafka_topic_partition_list_t* topic_partitions);
CPPKAFKA_API TopicPartitionList convert(const std::string& topic,
const std::vector<PartitionMetadata>& partition_metadata);
CPPKAFKA_API TopicPartitionsListPtr make_handle(rd_kafka_topic_partition_list_t* handle);
// Extracts a partition list subset belonging to the provided topics (case-insensitive)