mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 11:07:56 +00:00
Expand description of BufferedProducer
This commit is contained in:
@@ -24,6 +24,9 @@ namespace cppkafka {
|
|||||||
* produced messages (either in a buffer or non buffered way) are acknowledged by the kafka
|
* produced messages (either in a buffer or non buffered way) are acknowledged by the kafka
|
||||||
* brokers.
|
* brokers.
|
||||||
*
|
*
|
||||||
|
* When producing messages, this class will handle cases where the producer's queue is full so it\
|
||||||
|
* will poll until the production is successful.
|
||||||
|
*
|
||||||
* This class is not thread safe.
|
* This class is not thread safe.
|
||||||
*/
|
*/
|
||||||
template <typename BufferType>
|
template <typename BufferType>
|
||||||
@@ -167,7 +170,7 @@ void BufferedProducer<BufferType>::flush() {
|
|||||||
template <typename BufferType>
|
template <typename BufferType>
|
||||||
void BufferedProducer<BufferType>::wait_for_acks() {
|
void BufferedProducer<BufferType>::wait_for_acks() {
|
||||||
messages_acked_ = 0;
|
messages_acked_ = 0;
|
||||||
while (messages_acked_ != expected_acks_) {
|
while (messages_acked_ < expected_acks_) {
|
||||||
try {
|
try {
|
||||||
producer_.flush();
|
producer_.flush();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user