From a032f9a1e8473c2f3c0a02d022ce03d4fae0edb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Fri, 14 Aug 2020 19:29:55 +0200 Subject: [PATCH] Ability to block producer in case the underlying queue is full. --- include/cppkafka/producer.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/cppkafka/producer.h b/include/cppkafka/producer.h index 0c2edc4..16415e7 100644 --- a/include/cppkafka/producer.h +++ b/include/cppkafka/producer.h @@ -86,9 +86,10 @@ public: * The policy to use for the payload. The default policy is COPY_PAYLOAD */ enum class PayloadPolicy { - PASSTHROUGH_PAYLOAD = 0, ///< Rdkafka will not copy nor free the payload. - COPY_PAYLOAD = RD_KAFKA_MSG_F_COPY, ///< Means RD_KAFKA_MSG_F_COPY - FREE_PAYLOAD = RD_KAFKA_MSG_F_FREE ///< Means RD_KAFKA_MSG_F_FREE + PASSTHROUGH_PAYLOAD = 0, ///< Rdkafka will not copy nor free the payload. + COPY_PAYLOAD = RD_KAFKA_MSG_F_COPY, ///< Means RD_KAFKA_MSG_F_COPY + FREE_PAYLOAD = RD_KAFKA_MSG_F_FREE, ///< Means RD_KAFKA_MSG_F_FREE + BLOCK_ON_FULL_QUEUE = RD_KAFKA_MSG_F_BLOCK ///< Producer will block if the underlying queue is full }; /**