Skip to content

Commit a032f9a

Browse files
author
Hana Dusíková
committed
Ability to block producer in case the underlying queue is full.
1 parent b06e64e commit a032f9a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/cppkafka/producer.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ class CPPKAFKA_API Producer : public KafkaHandleBase {
8686
* The policy to use for the payload. The default policy is COPY_PAYLOAD
8787
*/
8888
enum class PayloadPolicy {
89-
PASSTHROUGH_PAYLOAD = 0, ///< Rdkafka will not copy nor free the payload.
90-
COPY_PAYLOAD = RD_KAFKA_MSG_F_COPY, ///< Means RD_KAFKA_MSG_F_COPY
91-
FREE_PAYLOAD = RD_KAFKA_MSG_F_FREE ///< Means RD_KAFKA_MSG_F_FREE
89+
PASSTHROUGH_PAYLOAD = 0, ///< Rdkafka will not copy nor free the payload.
90+
COPY_PAYLOAD = RD_KAFKA_MSG_F_COPY, ///< Means RD_KAFKA_MSG_F_COPY
91+
FREE_PAYLOAD = RD_KAFKA_MSG_F_FREE, ///< Means RD_KAFKA_MSG_F_FREE
92+
BLOCK_ON_FULL_QUEUE = RD_KAFKA_MSG_F_BLOCK ///< Producer will block if the underlying queue is full
9293
};
9394

9495
/**

0 commit comments

Comments
 (0)