mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-18 18:54:50 +00:00
Header support implementation (#115)
* header support implementation * Fixed issue when ptr is null and doesn't have a cloner function * Code complete with test cases updated travis file with v0.11.5 * Added compile time check for rdkafka header support version * Changes per last code review * Using brace list initializers
This commit is contained in:
committed by
Matias Fontanini
parent
9af4330c6d
commit
fbe3759fed
@@ -113,6 +113,7 @@ public:
|
||||
* \param builder The builder class used to compose a message
|
||||
*/
|
||||
void produce(const MessageBuilder& builder);
|
||||
void produce(MessageBuilder&& builder);
|
||||
|
||||
/**
|
||||
* \brief Produces a message
|
||||
@@ -120,6 +121,7 @@ public:
|
||||
* \param message The message to be produced
|
||||
*/
|
||||
void produce(const Message& message);
|
||||
void produce(Message&& message);
|
||||
|
||||
/**
|
||||
* \brief Polls on this handle
|
||||
@@ -157,6 +159,15 @@ public:
|
||||
*/
|
||||
void flush(std::chrono::milliseconds timeout);
|
||||
private:
|
||||
#if (RD_KAFKA_VERSION >= RD_KAFKA_HEADERS_SUPPORT_VERSION)
|
||||
void do_produce(const MessageBuilder& builder, MessageBuilder::HeaderListType&& headers);
|
||||
void do_produce(const Message& message, MessageBuilder::HeaderListType&& headers);
|
||||
#else
|
||||
void do_produce(const MessageBuilder& builder);
|
||||
void do_produce(const Message& message);
|
||||
#endif
|
||||
|
||||
// Members
|
||||
PayloadPolicy message_payload_policy_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user