Add offset commit and delivery report callbacks

This commit is contained in:
Matias Fontanini
2016-05-31 07:26:31 -07:00
parent fd2d616506
commit 82393b558e
13 changed files with 236 additions and 34 deletions

View File

@@ -20,6 +20,10 @@ TopicPartitionsListPtr convert(const vector<TopicPartition>& topic_partitions) {
}
vector<TopicPartition> convert(const TopicPartitionsListPtr& topic_partitions) {
return convert(topic_partitions.get());
}
vector<TopicPartition> convert(rd_kafka_topic_partition_list_t* topic_partitions) {
vector<TopicPartition> output;
for (int i = 0; i < topic_partitions->cnt; ++i) {
const auto& elem = topic_partitions->elems[i];