mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 19:18:04 +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)
|
* Sets the background event callback (invokes rd_kafka_conf_set_background_event_cb)
|
||||||
*/
|
*/
|
||||||
Configuration& set_background_event_callback(BackgroundEventCallback callback);
|
Configuration& set_background_event_callback(BackgroundEventCallback callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the event mask (invokes rd_kafka_conf_set_events)
|
||||||
|
*/
|
||||||
|
Configuration& set_events(int events);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -49,5 +49,6 @@
|
|||||||
#define RD_KAFKA_ADMIN_API_SUPPORT_VERSION 0x000b0500 //v0.11.5.00
|
#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_MESSAGE_LATENCY_SUPPORT_VERSION 0x000b0000 //v0.11.0.00
|
||||||
#define RD_KAFKA_EVENT_STATS_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
|
#endif // CPPKAFKA_MACROS_H
|
||||||
|
|||||||
@@ -187,6 +187,13 @@ public:
|
|||||||
}
|
}
|
||||||
#endif
|
#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)
|
* \brief Indicates whether this message is valid (not null)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -190,6 +190,11 @@ Configuration& Configuration::set_background_event_callback(BackgroundEventCallb
|
|||||||
rd_kafka_conf_set_background_event_cb(handle_.get(), &background_event_callback_proxy);
|
rd_kafka_conf_set_background_event_cb(handle_.get(), &background_event_callback_proxy);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Configuration& Configuration::set_events(int events) {
|
||||||
|
rd_kafka_conf_set_events(handle_.get(), events);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Configuration&
|
Configuration&
|
||||||
|
|||||||
Reference in New Issue
Block a user