mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 11:07:56 +00:00
Added support for message status and setting the event mask
This commit is contained in:
@@ -149,6 +149,11 @@ public:
|
||||
* Sets the background event callback (invokes rd_kafka_conf_set_background_event_cb)
|
||||
*/
|
||||
Configuration& set_background_event_callback(BackgroundEventCallback callback);
|
||||
|
||||
/**
|
||||
* Sets the event mask (invokes rd_kafka_conf_set_events)
|
||||
*/
|
||||
Configuration& set_events(int events);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -49,5 +49,6 @@
|
||||
#define RD_KAFKA_ADMIN_API_SUPPORT_VERSION 0x000b0500 //v0.11.5.00
|
||||
#define RD_KAFKA_MESSAGE_LATENCY_SUPPORT_VERSION 0x000b0000 //v0.11.0.00
|
||||
#define RD_KAFKA_EVENT_STATS_SUPPORT_VERSION 0x000b0000 //v0.11.0.00
|
||||
#define RD_KAFKA_MESSAGE_STATUS_SUPPORT_VERSION 0x000b06ff //v0.11.6
|
||||
|
||||
#endif // CPPKAFKA_MACROS_H
|
||||
|
||||
@@ -187,6 +187,13 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (RD_KAFKA_VERSION >= RD_KAFKA_MESSAGE_STATUS_SUPPORT_VERSION)
|
||||
rd_kafka_msg_status_t get_status() const {
|
||||
assert(handle_);
|
||||
return rd_kafka_message_status(handle_.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Indicates whether this message is valid (not null)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user