mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-02 03:28:01 +00:00
Add getters for Consumer callbacks
This commit is contained in:
@@ -282,6 +282,21 @@ public:
|
|||||||
*/
|
*/
|
||||||
std::string get_member_id() const;
|
std::string get_member_id() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the partition assignment callback.
|
||||||
|
*/
|
||||||
|
const AssignmentCallback& get_assignment_callback() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the partition revocation callback.
|
||||||
|
*/
|
||||||
|
const RevocationCallback& get_revocation_callback() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the rebalance error callback.
|
||||||
|
*/
|
||||||
|
const RebalanceErrorCallback& get_rebalance_error_callback() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Polls for new messages
|
* \brief Polls for new messages
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -180,6 +180,18 @@ string Consumer::get_member_id() const {
|
|||||||
return rd_kafka_memberid(get_handle());
|
return rd_kafka_memberid(get_handle());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Consumer::AssignmentCallback& Consumer::get_assignment_callback() const {
|
||||||
|
return assignment_callback_;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Consumer::RevocationCallback& Consumer::get_revocation_callback() const {
|
||||||
|
return revocation_callback_;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Consumer::RebalanceErrorCallback& Consumer::get_rebalance_error_callback() const {
|
||||||
|
return rebalance_error_callback_;
|
||||||
|
}
|
||||||
|
|
||||||
Message Consumer::poll() {
|
Message Consumer::poll() {
|
||||||
rd_kafka_message_t* message = rd_kafka_consumer_poll(get_handle(),
|
rd_kafka_message_t* message = rd_kafka_consumer_poll(get_handle(),
|
||||||
get_timeout().count());
|
get_timeout().count());
|
||||||
|
|||||||
Reference in New Issue
Block a user