mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-03 12:07:57 +00:00
Add partitioner callback to topic configuration
This commit is contained in:
@@ -5,11 +5,24 @@ using std::string;
|
||||
|
||||
namespace cppkafka {
|
||||
|
||||
void dummy_topic_destroyer(rd_kafka_topic_t*) {
|
||||
|
||||
}
|
||||
|
||||
Topic Topic::make_non_owning(rd_kafka_topic_t* handle) {
|
||||
return Topic(handle, NonOwningTag{});
|
||||
}
|
||||
|
||||
Topic::Topic(rd_kafka_topic_t* handle)
|
||||
: handle_(handle, &rd_kafka_topic_destroy) {
|
||||
|
||||
}
|
||||
|
||||
Topic::Topic(rd_kafka_topic_t* handle, NonOwningTag)
|
||||
: handle_(handle, &dummy_topic_destroyer) {
|
||||
|
||||
}
|
||||
|
||||
string Topic::get_name() const {
|
||||
return rd_kafka_topic_name(handle_.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user