mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-02 19:47:55 +00:00
Add wrapper for rd_kafka_outq_len
This commit is contained in:
@@ -166,6 +166,13 @@ public:
|
||||
* Gets the handle's configuration
|
||||
*/
|
||||
const Configuration& get_configuration() const;
|
||||
|
||||
/**
|
||||
* \brief Gets the length of the out queue
|
||||
*
|
||||
* This calls rd_kafka_outq_len
|
||||
*/
|
||||
int get_out_queue_length() const;
|
||||
protected:
|
||||
KafkaHandleBase(Configuration config);
|
||||
|
||||
|
||||
@@ -131,6 +131,10 @@ const Configuration& KafkaHandleBase::get_configuration() const {
|
||||
return config_;
|
||||
}
|
||||
|
||||
int KafkaHandleBase::get_out_queue_length() const {
|
||||
return rd_kafka_outq_len(handle_.get());
|
||||
}
|
||||
|
||||
void KafkaHandleBase::set_handle(rd_kafka_t* handle) {
|
||||
handle_ = HandlePtr(handle, &rd_kafka_destroy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user